Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rake 11.0.0 crashes with "cannot load such file -- rake/ext/fixnum" #114

Closed
tjgrathwell opened this issue Mar 9, 2016 · 15 comments
Closed

Comments

@tjgrathwell
Copy link

Tried the latest rake on a Rails and Sinatra project and I'm getting this result

Traviss-MacBook-Air:railsbridge_docs tjgrathwell$ rake
/Users/tjgrathwell/.rvm/gems/ruby-2.2.0/gems/rake-11.0.0/lib/rake.rb:37:in `require': cannot load such file -- rake/ext/fixnum (LoadError)
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/gems/rake-11.0.0/lib/rake.rb:37:in `<top (required)>'
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/gems/rake-11.0.0/bin/rake:31:in `require'
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/gems/rake-11.0.0/bin/rake:31:in `<top (required)>'
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/bin/rake:23:in `load'
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/bin/rake:23:in `<main>'
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tjgrathwell/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
@Sega100500
Copy link

Same error with Ruby 2.3.0 and Ruby on Rails

/home/ruby/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rake/ext/fixnum (LoadError)
        from /home/ruby/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/ruby/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.0.0/lib/rake.rb:37:in `<top (required)>'
        from /home/ruby/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/ruby/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/ruby/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.0.0/bin/rake:31:in `<top (required)>'
        from /home/ruby/.rbenv/versions/2.3.0/bin/rake:22:in `load'
        from /home/ruby/.rbenv/versions/2.3.0/bin/rake:22:in `<main>'

@RogerE
Copy link

RogerE commented Mar 9, 2016

Same here when trying to capify a Sinatra project

bundle exec cap install
/usr/local/lib/ruby/gems/2.2.0/gems/rake-11.0.0/lib/rake.rb:37:in require': cannot load such file -- rake/ext/fixnum (LoadError) from /usr/local/lib/ruby/gems/2.2.0/gems/rake-11.0.0/lib/rake.rb:37:in<top (required)>'
from /usr/local/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/lib/capistrano/all.rb:1:in require' from /usr/local/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/lib/capistrano/all.rb:1:in<top (required)>'
from /usr/local/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/bin/cap:2:in require' from /usr/local/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/bin/cap:2:in<top (required)>'
from /usr/local/bin/cap:23:in load' from /usr/local/bin/cap:23:in

'

yujinakayama added a commit to increments/qiitan-rb that referenced this issue Mar 9, 2016
tjgrathwell added a commit to tjgrathwell/rake that referenced this issue Mar 9, 2016
@chen7897499
Copy link

Same here when I working on my rails3 project,

lalala12:~/workspace/lala (master) $ rake -D time
/usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rake/ext/fixnum (LoadError)
        from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/rake-11.0.0/lib/rake.rb:37:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/rake-11.0.0/bin/rake:31:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/bin/rake:23:in `load'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/bin/rake:23:in `<main>'
lalala12:~/workspace/lala (master) $ bundle exec rake -D time
/usr/local/rvm/gems/ruby-1.9.3-p551/gems/rake-11.0.0/lib/rake.rb:37:in `require': cannot load such file -- rake/ext/fixnum (LoadError)
        from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/rake-11.0.0/lib/rake.rb:37:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/rake-11.0.0/bin/rake:31:in `require'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/rake-11.0.0/bin/rake:31:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/bin/rake:23:in `load'
        from /usr/local/rvm/gems/ruby-1.9.3-p551/bin/rake:23:in `<main>'

but after run rvm remove 1.9.3, rvm install 1.9.3, and bundle install
it works fine,

lalala12:~/workspace/lala (master) $ rake --version
rake, version 0.9.2.2

@tjgrathwell
Copy link
Author

Looks like the file fixnum.rb is referenced but not actually included in the gem. I've made a PR #115 to add fixnum.rb to the manifest, but the gemspec still needs to be rebuilt and 11.0.0 should probably be yanked.

@ioquatix
Copy link
Member

ioquatix commented Mar 9, 2016

I feel like it goes without saying, but such an important gem should probably be tested more throughly before being released!?

/home/travis/.rvm/gems/ruby-2.2.4/gems/rake-11.0.0/lib/rake.rb:37:in `require': cannot load such file -- rake/ext/fixnum (LoadError)
    from /home/travis/.rvm/gems/ruby-2.2.4/gems/rake-11.0.0/lib/rake.rb:37:in `<top (required)>'
    from /home/travis/.rvm/gems/ruby-2.2.4/gems/rake-11.0.0/bin/rake:31:in `require'
    from /home/travis/.rvm/gems/ruby-2.2.4/gems/rake-11.0.0/bin/rake:31:in `<top (required)>'
    from /home/travis/.rvm/gems/ruby-2.2.4/bin/rake:23:in `load'
    from /home/travis/.rvm/gems/ruby-2.2.4/bin/rake:23:in `<main>'
    from /home/travis/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
    from /home/travis/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'

@hsbt hsbt closed this as completed in eacabb3 Mar 9, 2016
@hsbt
Copy link
Member

hsbt commented Mar 9, 2016

Hi All. Thank you for your report. I added missing file to gem package and released 11.0.1. Please try this 🙇

@ioquatix
Copy link
Member

ioquatix commented Mar 9, 2016

Now it's broken some different way.

$ bundle exec rake
rake aborted!
NoMethodError: undefined method `last_comment' for #<Rake::Application:0x0000000194abf0>
/home/travis/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-3.4.3/lib/rspec/core/rake_task.rb:91:in `define'
/home/travis/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-3.4.3/lib/rspec/core/rake_task.rb:71:in `initialize'
/home/travis/build/ioquatix/trenni/Rakefile:4:in `new'
/home/travis/build/ioquatix/trenni/Rakefile:4:in `<top (required)>'
/home/travis/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

https://travis-ci.org/ioquatix/trenni/jobs/114719394

@hsbt
Copy link
Member

hsbt commented Mar 9, 2016

@ioquatix It's rspec issue. I removed last_comment at Rake 11

@Sega100500 It's not rake issue. You need to learn bundler environment.

@cosmo0920
Copy link

Thanks for fixing this! I've confirmed that this issue is solved with test-unit 3.1.7 and rake 11.0.1.

@tjgrathwell
Copy link
Author

Thanks for the update @hsbt, it's working for me minus the rspec-core crash

Made a PR for the rspec-core crash at rspec/rspec-core#2197

@Sega100500
Copy link

@hsbt
all work!
Thanks!
I haste in previous issue

@ioquatix
Copy link
Member

ioquatix commented Mar 9, 2016

Yes it may be a rspec issue. How many people is this going to break for?

@lsegal
Copy link

lsegal commented Mar 9, 2016

Can I ask why last_comment was removed without a deprecation notice? As far as I can tell, last_comment was a public method.

This also breaks YARD. Multiple widely used gems are broken by this change. Was there a reason to break this?

@hsbt
Copy link
Member

hsbt commented Mar 9, 2016

@lsegal It's deprecated methods a long time. It's documented here:

# TODO: Remove in Rake 11

Can I ask why last_comment was removed without a deprecation notice?

It's my fault. I should setup transition way before Rake 11 release. Sorry.

@lsegal
Copy link

lsegal commented Mar 9, 2016

@hsbt actually, my question about why it was removed wasn't really about the transition plan, but rather, why it was necessary to remove this in the first place?

I understand that it's a superfluous method and was around for backward compatibility (though poorly documented as such), but the implementation was a single line of code. I guess my question is this:

Was having this alias around an actual maintenance burden? Was it causing some technical debt? Did it create any bugs?

If none of these things are true, it's worth noting that removing this method has now created more technical debt, maintenance burdens, and bugs in other projects than simply keeping it around has. I would recommend reverting the removal of the last_comment alias since I personally can't see a burden in having it there. Looking at history I see that it really hasn't changed in years anyhow.

gerrywastaken added a commit to gerrywastaken/quality that referenced this issue Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants