"rake assets:precompile" raise error at new rails project
ledowong opened this issue · 10 comments
Hi, I am new to require.js. I created a new rails project, add requirejs-rails, just try to make it works.
- ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
- rails 4.2.3
- requirejs-rails 0.9.9
I follow Usage Step 1-3, then I run:
rake assets:precompile
It return error...
/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby /usr/local/rvm/rubies/ruby-2.2.1/bin/rake requirejs:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
NoMethodError: undefined method `include?' for #<Pathname:0x00000006493940>
/usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.3.3/lib/sprockets/uri_tar.rb:13:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.3.3/lib/sprockets/unloaded_asset.rb:24:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.3.3/lib/sprockets/unloaded_asset.rb:24:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.3.3/lib/sprockets/base.rb:55:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/sprockets-3.3.3/lib/sprockets/base.rb:55:in `file_digest'
/usr/local/rvm/gems/ruby-2.2.1/gems/requirejs-rails-0.9.9/lib/tasks/requirejs-rails_tasks.rake:165:in `block (4 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.2.1/gems/requirejs-rails-0.9.9/lib/tasks/requirejs-rails_tasks.rake:148:in `each'
/usr/local/rvm/gems/ruby-2.2.1/gems/requirejs-rails-0.9.9/lib/tasks/requirejs-rails_tasks.rake:148:in `block (3 levels) in <top (required)>'
Tasks: TOP => requirejs:precompile:all => requirejs:precompile:digestify_and_compress
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby ...]
/usr/local/rvm/gems/ruby-2.2.1/gems/requirejs-rails-0.9.9/lib/tasks/requirejs-rails_tasks.rake:18:in `ruby_rake_task'
/usr/local/rvm/gems/ruby-2.2.1/gems/requirejs-rails-0.9.9/lib/tasks/requirejs-rails_tasks.rake:83:in `block (3 levels) in <top (required)>'
Tasks: TOP => assets:precompile => requirejs:precompile:external
(See full trace by running task with --trace)
I committed my new testing project here: https://github.com/ledowong/rjstest/commits/master
Did I miss something? Thanks.
I think this was fixed a couple of days ago. Try putting using the current master in Gemfile.
Any chances of a new release so we can use the stable gem instead of the git master?
All, just to let you know I haven't forgotten about this. In the middle of a big code rewrite that should be complete soon.
whats the status on this? I could really use a fix
@passa763 I'll put out an official release for this over the weekend.
this issue is still open? I guess I got the same problem right now
This is probably related to issue #257 and my own issue #268
As described in the other issues, I'm currently testing my fix:
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'
and will submit a pull request when I've tested them out.