Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374175 - dev-ruby/rails-3.0.9 requires rake gem 0.9.2
Summary: dev-ruby/rails-3.0.9 requires rake gem 0.9.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 21:02 UTC by Reuben Martin
Modified: 2011-07-09 08:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
rails-3.0.7 Gemfile.lock (Gemfile.lock,1.67 KB, text/plain)
2011-07-06 18:00 UTC, Reuben Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2011-07-05 21:02:31 UTC
I recently upgraded rails from 3.0.7 to 3.0.9.

Rails app rojects keep a list of all gems used, and if you intend to use the system's gem rather than bundling gems internally in the app, you have to update the project whenever your system's gems are updated so that the two match.

Rails projects are updated from within the project root using:

rake update:rails

When I try to do that I get the following:

Could not find rake-0.9.2 in any of the sources
Run `bundle install` to install missing gems.

As I understand it, the "bundle install" is not the preferred Gentoo method of managing gems since they are not installed system-wide, and bypass the build packaging system.

Reproducible: Always
Comment 1 Hans de Graaff gentoo-dev Security 2011-07-06 06:04:35 UTC
dev-ruby/railties depends on rake >=0.8.7 so my guess is that some other gem in you Gemfile requires rake 0.9.0. You can check the Gemfile.lock to see which one.
Comment 2 Reuben Martin 2011-07-06 17:58:48 UTC
The Gemfile.lock does list rake (>= 0.8.7) for railities, but then further down lists rake-0.9.2 by itself. I'm not sure why it is in there because it was not available before upgrading rails to 3.0.7. All the other gem dependencies are still listing the previous version since I haven't been able to get it to update.

I tried to create a new rails project to see what the Gemfile.lock would contain from the newer rails-3.0.9, but that fails as well:

$ rails new dummy
/usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- rails/cli (LoadError)
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from /usr/lib64/ruby/gems/1.8/gems/rails-3.0.9/bin/rails:8
        from /usr/bin/rails:8:in `load'
        from /usr/bin/rails:8
Comment 3 Reuben Martin 2011-07-06 18:00:38 UTC
Created attachment 279253 [details]
rails-3.0.7 Gemfile.lock

attaching Gemfile.lock
Comment 4 Hans de Graaff gentoo-dev Security 2011-07-06 18:28:14 UTC
As far as I know nothing in the Gentoo tree currently depends on rake 0.9, and I can create a new rails app with rails 3.0.9 without problems. Since you are using bundler, it might have dumped gems in the gem directory in your home directory, and that may be where rake 0.9 is being picked up.
Comment 5 Reuben Martin 2011-07-06 21:56:14 UTC
I used bundler to see what it would download that it thinks is missing, but afterwards I removed the ~/.gem directory. Does it drop files anywhere else that I need to remove?
Comment 6 Reuben Martin 2011-07-07 00:24:44 UTC
Not quite sure what the problem was, but emerging rdoc seemed to fix the issue with rails not starting up.

After that I could delete the Gemfile.lock and rake would build a new one.
Comment 7 Hans de Graaff gentoo-dev Security 2011-07-07 04:40:49 UTC
(In reply to comment #6)
> Not quite sure what the problem was, but emerging rdoc seemed to fix the issue
> with rails not starting up.

Ah right, that's the same problem we had with Rails 2.3.12. One of the task files requires an rdoc task file that is only available in the rdoc gem. I've added this dependency now.

> After that I could delete the Gemfile.lock and rake would build a new one.

Ok, so does that mean that your original problem is solved?
Comment 8 Reuben Martin 2011-07-08 01:55:25 UTC
Yes, problem seems to be solved. It would seem that messing with bundler caused the newer version of rake to be added to the gem lock file, and the missing rdoc prevented me from generating an updated gem lock file.