question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rails 4.2.5.1: NoMethodError: undefined method `paths' for nil:NilClass

See original GitHub issue

I’m getting the following error after upgrading from Rails 4.2.5 to 4.2.5.1.

Any ideas what might be wrong?

NoMethodError: undefined method `paths' for nil:NilClass
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/requirejs-rails-1.0.0/lib/tasks/requirejs-rails_tasks.rake:55:in `block (2 levels) in <top (required)>'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/Users/samstarling/.rbenv/versions/2.2.0/bin/rake:23:in `load'
/Users/samstarling/.rbenv/versions/2.2.0/bin/rake:23:in `<main>'
Tasks: TOP => requirejs:precompile:all => requirejs:precompile:digestify_and_compress => requirejs:precompile:run_rjs => requirejs:setup
rake aborted!
Command failed with status (1): [/Users/samstarling/.rbenv/versions/2.2.0/b...]
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils.rb:66:in `block in create_shell_runner'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils.rb:57:in `call'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils.rb:57:in `sh'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb:37:in `sh'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils.rb:94:in `ruby'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb:37:in `ruby'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/requirejs-rails-1.0.0/lib/tasks/requirejs-rails_tasks.rake:18:in `ruby_rake_task'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/requirejs-rails-1.0.0/lib/tasks/requirejs-rails_tasks.rake:83:in `block (3 levels) in <top (required)>'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/Users/samstarling/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/Users/samstarling/.rbenv/versions/2.2.0/bin/rake:23:in `load'
/Users/samstarling/.rbenv/versions/2.2.0/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile => requires:precompile:external

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
jankeesvwcommented, Mar 12, 2016

I’m running still running into this problem, I upgraded Rails to 4.2.6 which depends on sprockets (>= 3.0.0). Is there a way to hotfix this so I can deploy my security updates?

1reaction
carsomyrcommented, Feb 8, 2016

Thanks all for the reports. I’m looking to have a fix out in the upcoming week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ruby on Rails NoMethodError: undefined method `[]' for nil ...
Any help is appreciated, thanks! Edit: Here's the exception I get from the console NoMethodError (undefined method `[]' for nil:NilClass): app/ ...
Read more >
[Solved]-undefined method `new' for nil:NilClass-ruby
undefined method `reset' for RDoc::TopLevel:Class when installing a new Ruby gem · undefined method `[]' for nil:NilClass for Rails model on new ·...
Read more >
Changelog - RSpec Rails - Relish
Fix NoMethodError: undefined method 'strip' when using a Pathname object as the fixture file path. (Aaron Kromer, #2026); When generating feature specs, ...
Read more >
Top 10 errors from 1000+ Ruby on Rails projects ... - Rollbar
NoMethodError : undefined method 'id' for nil:NilClass; 7. ... Rails.application.routes.draw do # all your other routes match '*unmatched', ...
Read more >
Bug #18401: NoMethodError - undefined method `each' for nil ...
NoMethodError - undefined method `each' for nil:NilClass on complex tasks ... sclo-ror42-rubygem-activerecord-4.2.5.1-4.el7.noarch ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found