Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

"rake assets:precompile" raise error at new rails project #250

Closed
ledowong opened this issue Aug 24, 2015 · 10 comments
Closed

"rake assets:precompile" raise error at new rails project #250

ledowong opened this issue Aug 24, 2015 · 10 comments

Comments

@ledowong
Copy link

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.

@swils
Copy link
Contributor

swils commented Aug 28, 2015

I think this was fixed a couple of days ago. Try putting using the current master in Gemfile.

@oliverklee
Copy link

Any chances of a new release so we can use the stable gem instead of the git master?

@carsomyr
Copy link
Collaborator

carsomyr commented Sep 8, 2015

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.

@agis
Copy link
Contributor

agis commented Sep 8, 2015

@carsomyr Great to hear! While you're at it, please consider looking at #249 too. Thanks!

@passabilities
Copy link

whats the status on this? I could really use a fix

@carsomyr
Copy link
Collaborator

carsomyr commented Dec 5, 2015

@passa763 I'll put out an official release for this over the weekend.

@passabilities
Copy link

@carsomyr so this seemed to fix some of my issues. could you take a closer look to the issue #247

@valeriosillari
Copy link

this issue is still open? I guess I got the same problem right now

@thegillis
Copy link

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.

@carsomyr
Copy link
Collaborator

Merged in PR #249.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants