I copied config/environments/development.rb to config/environments/ci.rb.
When I run with RAILS_ENV=development, the asset search path includes my gem vendor directories, in particular for jquery-ui-rails. However, when I run with RAILS_ENV=ci it does not.
From the console, Rails.application.config.assets.paths evaluates to the following with development
irb(main):002:0> Rails.application.config.assets.paths
=> ["/var/www/ci/conflux/app/assets/images",
"/var/www/ci/conflux/app/assets/javascripts",
"/var/www/ci/conflux/app/assets/stylesheets",
"/var/www/ci/conflux/vendor/assets/stylesheets",
"/opt/comcast/ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-1.0.19/vendor/assets/javascripts",
"/opt/comcast/ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-ui-rails-1.0.0/vendor/assets/images",
"/opt/comcast/ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-ui-rails-1.0.0/vendor/assets/javascripts",
"/opt/comcast/ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-ui-rails-1.0.0/vendor/assets/stylesheets"]
but for ci I only get the following:
irb(main):002:0> Rails.application.config.assets.paths
=> ["/var/www/ci/conflux/app/assets/images",
"/var/www/ci/conflux/app/assets/javascripts",
"/var/www/ci/conflux/app/assets/stylesheets",
"/var/www/ci/conflux/vendor/assets/stylesheets",
"/opt/comcast/ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-1.0.19/vendor/assets/javascripts"]
Have you added the ci environment into config/application.rb
?
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test ci)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With