sferik/rails_admin — Issue #829: assets:precompile fails because of bootstrap
Author: rorra
Created: 2011-11-11 21:26:40+00:00
State: open

I cannot get the rails_admin to precompile the assets, I'm running with rails 3.1.1

This is the problem with the precompile command

/Users/rorra/.rvm/rubies/ruby-1.8.7-p334/bin/ruby /Users/rorra/.rvm/gems/ruby-1.8.7-p334/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Undefined variable: "$baseline".
(in /Users/rorra/.rvm/gems/ruby-1.8.7-p334/gems/bootstrap-sass-1.4.0/vendor/assets/stylesheets/bootstrap/forms.css.scss)

Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/Users/rorra/.rvm/rubies/ruby-1.8.7-p334/b...]

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

This is what my Gemfile looks like

source 'http://rubygems.org'

gem 'rails', '3.1.1'

gem 'json'
gem 'jquery-rails'

gem 'rails3-generators' # Rails generators

gem 'mysql' # Database access
gem 'haml' # Haml views
gem 'capistrano' # For deploy
gem 'capistrano-ext' # Multistage support (staging, production)
gem 'dynamic_form' # Errors messages like rails 2

gem 'kaminari' # Pagination
gem 'newrelic_rpm' # Newrelic monitorship
gem 'devise' # Authentication
gem "oa-oauth", :require => "omniauth/oauth" # Devise with facebook and wtitter
gem 'oa-openid', :require => 'omniauth/openid' # Devise with google
gem 'dalli' # Memcache temp results
gem 'nokogiri' # Web Services
gem 'recaptcha',:require => "recaptcha/rails" # Avoid spam
gem 'geocoder' # Geocode positions
gem 'paperclip' # Images management
gem 'easy_translate' # Translations on the fly
gem 'httparty' # Web services communication
gem 'aws-s3' # Storing images on amazon
gem 'fastercsv' # For rails admin
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git' # Rails admin

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '>= 3.1.4'
gem 'coffee-rails', '>= 3.1.1'
gem 'uglifier', '>= 1.0.3'
end

# For deploy
group :production do
gem 'execjs'
gem 'therubyracer'
end

# Nice colors in console on development
group :development do
gem 'wirble' # Colors
gem 'hirb' # ActiveRecord columns
end

group :development, :test do
gem 'factory_girl_rails' # Model content for testing
gem 'rspec' # Testing framework
gem 'rspec-rails' # Rspec integration into rails
gem 'capybara' # Generic browser engine
gem 'database_cleaner' # Clean database for testing
gem 'rcov' # Test coverage
end

And finally this is my production configuration file

Vaganga3::Application.configure do
# Settings specified here will take precedence over those in config/application.rb

# Code is not reloaded between requests
config.cache_classes = true

# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true

# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false

# Compress JavaScripts and CSS
config.assets.compress = true

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false

# Generate digests for assets URLs
config.assets.digest = true

# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH

# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true

# See everything in the log (default is :info)
# config.log_level = :debug

# Use a different logger for distributed setups
# config.logger = SyslogLogger.new

# Use a different cache store in production
# config.cache_store = :mem_cache_store
config.cache_store = :dalli_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"

# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
config.assets.precompile += %w( *.js *.css )

# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false

# Enable threaded mode
# config.threadsafe!

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true

# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify

end