Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy of environments/development asset path cannot find jquery-ui-rails in gems directories

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"]
like image 835
Marlin Pierce Avatar asked Oct 18 '12 20:10

Marlin Pierce


1 Answers

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
like image 67
mccannf Avatar answered Sep 30 '22 20:09

mccannf