Project

General

Profile

Bug #12977

sprockets-rails 2.2.2 or higher is needed for production assets setup

Added by Dominic Cleal over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Since #7230, the production environment implicitly requires sprockets-rails 2.2.2 or higher to function, but Rails 4.1.x depends on ~> 2.0 only. The min version should be set in the Gemfile.

config/environments/production.rb relies on getting and setting the Rails app.assets_manifest setting introduced by sprockets-rails 2.2.2 in https://github.com/rails/sprockets-rails/commit/3f26afbaa3d6a5ebe26403c6f42a70a1de96d1d6


Related issues

Related to Foreman - Feature #7230: Upgrade Ruby on Rails to 4.1Closed2014-08-22
Related to Foreman - Bug #13074: sprockets-rails dependency should not be in assets.rb onlyClosed2016-01-08

Associated revisions

Revision e6d80ffe (diff)
Added by Dominic Cleal over 3 years ago

fixes #12977 - set minimum sprockets-rails to 2.2.2

fb9f45e uses the app.assets_manifest setting in the production
environment to reconfigure asset manifests on the fly, but this was
introduced only in 2.2.2 and not ~> 2.0 which Rails 4.1.x depends on.

Revision 4ef6af36 (diff)
Added by Dominic Cleal over 3 years ago

refs #12977 - set max version of sprockets-rails

Older versions of Bundler (e.g. 1.3.5) attempt to install a 3.x version
and then fail to resolve dependencies.

$ bundle 1.3.5 install
Bundler could not find compatible versions for gem "sprockets-rails":
In Gemfile:
rails (= 4.1.5) ruby depends on
sprockets-rails (~> 2.0) ruby
sprockets-rails (3.0.0)

Revision 1139297f (diff)
Added by Dominic Cleal over 3 years ago

refs #12977 - set minimum version of sprockets-rails

History

#1 Updated by Dominic Cleal over 3 years ago

#2 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3020 added

#3 Updated by Dominic Cleal over 3 years ago

Dug out the log:

+ /usr/bin/rake db:migrate RAILS_ENV=production --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `assets_manifest=' for #<Foreman::Application:0x00000005721e88>
/builddir/build/BUILD/foreman-1.11.0/config/environments/production.rb:150:in `block (3 levels) in <top (required)>'
/usr/share/ruby/tempfile.rb:324:in `open'
/builddir/build/BUILD/foreman-1.11.0/config/environments/production.rb:148:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:36:in `call'
/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:44:in `each'
/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/usr/share/gems/gems/railties-4.1.5/lib/rails/application/finisher.rb:64:in `block in <module:Finisher>'
/usr/share/gems/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/gems/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `run'
/usr/share/gems/gems/railties-4.1.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/share/ruby/tsort.rb:226:in `block in tsort_each'
/usr/share/ruby/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/share/ruby/tsort.rb:427:in `each_strongly_connected_component_from'
/usr/share/ruby/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/share/ruby/tsort.rb:345:in `each'
/usr/share/ruby/tsort.rb:345:in `call'
/usr/share/ruby/tsort.rb:345:in `each_strongly_connected_component'
/usr/share/ruby/tsort.rb:224:in `tsort_each'
/usr/share/ruby/tsort.rb:205:in `tsort_each'
/usr/share/gems/gems/railties-4.1.5/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/gems/gems/railties-4.1.5/lib/rails/application.rb:300:in `initialize!'
/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `public_send'
/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `method_missing'
/builddir/build/BUILD/foreman-1.11.0/config/environment.rb:5:in `<top (required)>'

#4 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/theforeman/foreman/pull/3022 added

#6 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13074: sprockets-rails dependency should not be in assets.rb only added

Also available in: Atom PDF