-
Notifications
You must be signed in to change notification settings - Fork 199
Rails 4.2.5.1: NoMethodError: undefined method `paths' for nil:NilClass #257
Comments
@samstarling I had a similar issue some time back, try downgrading your version of |
@IceDragon200 You're right - downgrading |
This seems to be the issue. rails/sprockets-rails#237 |
Note that I had to lock sprockets to < 3.0 due to a bug in requirejs-rails: jwhitley/requirejs-rails#257
Note that I had to lock sprockets to < 3.0 due to a bug in requirejs-rails: jwhitley/requirejs-rails#257
Note that I had to lock sprockets to < 3.0 due to a bug in requirejs-rails: jwhitley/requirejs-rails#257
Note that I had to lock sprockets to < 3.0 due to a bug in requirejs-rails: jwhitley/requirejs-rails#257
Note that I had to lock sprockets to < 3.0 due to a bug in requirejs-rails: jwhitley/requirejs-rails#257
Thanks all for the reports. I'm looking to have a fix out in the upcoming week. |
I have the same issue... Hope this can get fixed! |
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? |
When I try to downgrade
I tried downgrading a lot of gems, but bundler can't seem to solve the dependency issues. @carsomyr are you working on a fix? I would love to help! |
All, I've been very busy lately delivering a major feature. I'll try to look into this on Saturday. |
No problem @carsomyr, if you need a hand let me know. For now I removed this Gem and switched to using plain |
You can replace |
@matfiz thanks for the comment. But what do you mean? Where should I replace this? |
I got this result for the manifest files:
|
@jankeesvw have you checked in production env? |
@matfiz no only in development mode, how do you overwrite this? Add something to an initializer? |
The assets_manifest reads the Sprockets manifest file from compiled assets - these are available only in production. AFAIK you can emulate it in development by setting |
Thanks for the quick response @matfiz, can you give me an concrete example of how we can fix this error? |
Hi @matfiz, would be great if you have some more information on your proposed solution! Thanks! ✨ |
I've just run into this issue as well. Is there any update on suggested resolutions? |
Is there someone with a solution / work around? |
@jankeesvw I switched my app to using https://reinteractive.net/posts/172-a-better-way-to-modularise-your-js-in-rails It has been working well for me, and fits more comfortably into the asset pipeline. |
@ijdickinson that looks good! Did it require a lot of rewriting? I would rather not rewrite the app, there is quite some JavaScript in my application. |
@jankeesvw No, it was very straightforward. The signature for the modulejs We probably shouldn't continue this discussion in this issue thread - it's going a bit off-topic. Please feel free to pm me if you want more details! |
For me this appeared to be a problem with a sprockets upgrade. We needed to upgrade to sprockets 3 and there were multiple errors related to asset precompile. The cause of the actual error is essentially that it's trying to access:
Unfortunately in sprockets along the way this no longer works. Instead of accessing application.assets.path, the valid location now appears to be application.config.assets. Although this was able to get us further, there are many more sprockets problems. I'll see if I can clean things up a bit and test my changes against sprockets 2, but my company is now using: https://github.com/MediaFactual/requirejs-rails/tree/rails5-1-0-0 or with bundler: gem 'requirejs-rails', :git => 'https://github.com/MediaFactual/requirejs-rails.git', :branch => 'rails5-1-0-0' If these changes appear to be stable on our systems, I'll submit a pull request. |
I'm getting the following error after upgrading from Rails 4.2.5 to 4.2.5.1.
Any ideas what might be wrong?
The text was updated successfully, but these errors were encountered: