-
Notifications
You must be signed in to change notification settings - Fork 198
Fix the "undefined method `hexdigest' for nil:NilClass" error #104
Conversation
|
This patch doesn't work with our coffeescript codebase: It causes requirejs to try and work on the .coffee source files instead of the compiled js files. |
|
@micha-f Please send me a sample. I used the default Rails 3.x asset manager to resolve the file address on the filesystem in order to load it, maybe the .coffee file should be treated differently or it is not registered as such on the default asset chain. |
|
So your assets aren't in What does |
|
@micha-f, I cloned your repo and run the commands. I used requirejs-rails from my patched repo and I did not get errors: I don't use coffee scripts, but it seems that the issue has nothing to do with requirejs-rails but with the way you are using it or a rails problem. Your code didn't even call requirejs |
|
@arlm, there is a module 'main' in requirejs.yml which it builds. There are no errors when running assets:precompile. However, it creates coffee.gz files (useless + shouldn't touch the app/assets dir) and the coffee script is not actually compiled: |
|
This PR has multiple problems as it stands, so I'm going to reject it as a whole (keeping parts) and close this issue. That said, I very much appreciate the request, and have some feedback for future reports/PRs below. The digest warning is a good idea, thanks. I've cherry-picked that and upgraded it to be an error. IMO this deserves error treatment, since it means the build couldn't find an expected/required asset. At that point, all bets are off and the build should be considered corrupt. I'll note that the proposed change to find the asset pathname isn't correct as others with CoffeeScript problems have found out the hard way. Last but not least, this issue has incomplete repro steps and/or tests. A potential cause (assets in |
This issue happened on heroku and my local repository. It happened because my assets were on lib/assets and not public/assets
Fixes issue #101