I'm trying to run rspec tests in a recent updated ancient app. I just updated Rails (3.2 to 4.0.13), rspec (2.x to 3.4.4) and many other gems. When I try to execute the rspec tests, I get this error in the SprocketsRails gem.
13:00 $ RAILS_ENV=test bundle exec rspec
/home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>': uninitialized constant ActionView::Helpers::TagHelper (NameError)
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `require'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `<module:Helper>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `require'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/railties-4.0.13/lib/rails/all.rb:11:in `require'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/railties-4.0.13/lib/rails/all.rb:11:in `block in <top (required)>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/railties-4.0.13/lib/rails/all.rb:9:in `each'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/railties-4.0.13/lib/rails/all.rb:9:in `<top (required)>'
from /home/user/workspace/nostraweb/config/application.rb:3:in `require'
from /home/user/workspace/nostraweb/config/application.rb:3:in `<top (required)>'
from /home/user/workspace/nostraweb/config/environment.rb:2:in `require'
from /home/user/workspace/nostraweb/config/environment.rb:2:in `<top (required)>'
from /home/user/workspace/nostraweb/spec/rails_helper.rb:3:in `require'
from /home/user/workspace/nostraweb/spec/rails_helper.rb:3:in `<top (required)>'
from /home/user/workspace/nostraweb/spec/models/my_model_spec.rb:1:in `require'
from /home/user/workspace/nostraweb/spec/models/my_model_spec.rb:1:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `load'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/bin/rspec:23:in `load'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/bin/rspec:23:in `<main>'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/bin/ruby_executable_hooks:15:in `eval'
from /home/user/.rvm/gems/ruby-2.2.3@nostraweb/bin/ruby_executable_hooks:15:in `<main>'
It is very strange because if we open the legacy_asset_tag_helper class, we can see that this class is only loaded for Rails 2.x and 3.x (and my app is running in Rails 4.0.13). Maybe I forget to upgrade some gem or something else?
Seems that ActionView::Helpers::AssetUrlHelper is not defined in your application so it is trying to load the legacy_asset_tag_helper file. Make sure that constant is defined at that point.
I'm trying to run rspec tests in a recent updated ancient app. I just updated Rails (3.2 to 4.0.13), rspec (2.x to 3.4.4) and many other gems. When I try to execute the rspec tests, I get this error in the SprocketsRails gem.
It is very strange because if we open the legacy_asset_tag_helper class, we can see that this class is only loaded for Rails 2.x and 3.x (and my app is running in Rails 4.0.13). Maybe I forget to upgrade some gem or something else?
My Gemfile.lock