Bug 715385 - Rails fails with message about missing 'rake' gem
Summary: Rails fails with message about missing 'rake' gem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-rails
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mo Morsi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-22 18:08 UTC by Victor Bogado
Modified: 2011-07-22 19:27 UTC (History)
7 users (show)

Fixed In Version: rubygem-railties-3.0.5-3.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-08 17:57:52 UTC
Type: ---


Attachments (Terms of Use)

Description Victor Bogado 2011-06-22 18:08:43 UTC
Description of problem:
After creating a new rails project any rails or rake command on this project site fails with the message "Could not find gem 'rake', required by 'rails (= 3.0.5)', in any of the sources".

Version-Release number of selected component (if applicable):
rubygem-rails-3.0.5-2.fc15.noarch
rubygem-rake-0.9.0-0.3.beta.4.fc15.noarch


How reproducible:
every time.

Steps to Reproduce:
1. Create new rails project with 'rails new site'
2. Enter directory 'cd site'
3. Check to see possible rake task 'rake -T'
  
Actual results:
rake displays the error message "Could not find gem 'rake', required by 'rails (= 3.0.5)', in any of the sources" in red.

Expected results:
rake should list all possible tasks.

Additional info:
I've already update the rubygem-actionmailer that showed a similar problem.

Comment 1 Vít Ondruch 2011-06-23 07:11:44 UTC
I cannot reproduce the behavior you describe. I did the following:

1) # yum install rubygem-rails
2) $ rails new site
3) $ cd site
4) $ rake -T
   Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your
   Gemfile.
5) $ yum install rubygem-sqlite3
6) $ rake -T
   rake aborted!
   undefined method `task' for #<Site::Application:0x7f6e8b4a77b0>

   (See full trace by running task with --trace)
7) $ rpm -q rubygem-rails
   rubygem-rails-3.0.5-2.fc15.noarch
   $ rpm -q rubygem-rake
   rubygem-rake-0.9.0-0.3.beta.4.fc15.noarch

So there is issue with Rake, but different than you describe.

Guys, what will we do about the Rake? It seems that Rake 0.9.x fixes some backward compatibility issues as well as there are some fixes in Rails 3.0.8 and 3.0.9.

Comment 2 Mamoru TASAKA 2011-06-23 11:32:35 UTC
(In reply to comment #1)
> 6) $ rake -T
>    rake aborted!
>    undefined method `task' for #<Site::Application:0x7f6e8b4a77b0>

Perhaps adding "include Rake::DSL" somewhere fixes this issue. Although rake 0.9.2 (now in testing) again rescues this issue, you(?) should fix rails (or sqlite3? I have not checked in detail) as calling task :foo without adding "include Rake::DSL" is deprecated.

Comment 3 Vít Ondruch 2011-06-23 11:55:28 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > 6) $ rake -T
> >    rake aborted!
> >    undefined method `task' for #<Site::Application:0x7f6e8b4a77b0>
> 
> Perhaps adding "include Rake::DSL" somewhere fixes this issue. Although rake
> 0.9.2 (now in testing) again rescues this issue, you(?) should fix rails (or
> sqlite3? I have not checked in detail) as calling task :foo without adding
> "include Rake::DSL" is deprecated.

I just tested with some older Rake from rawhide:


# rake -V
rake, version 0.9.1


and it works, although it complains:


# rake -T
WARNING: Global access to Rake DSL methods is deprecated.  Please Include
    ...  Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method StackRails::Application#task called at /opt/redhat/rails_3.0/root/usr/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/application.rb:214:in `initialize_tasks'
rake about              # List versions of all Rails frameworks and the environment
rake db:create          # Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config)
[ snip ]


sqlite3 is not an issue. That just popped up because I tried to refine the reproducer.

Comment 4 Victor Bogado 2011-06-23 13:29:14 UTC
Guys this seems to be a problem with rails interacting with rake, the message only appeared after I entered the rails project directory. Anyway the problem is gone after I updated the package rubygem-activesupport-3.0.5-3.fc15.noarch that is available in updates-testing. My guess is that this bug is already solved. I'll test further.

Comment 5 Mo Morsi 2011-06-24 00:28:34 UTC
Its not the updated rubygem-activesupport in updates-testing that fixes the issue is the updated rubygem-rack.

This issue is fixed with a newer version of Rack

http://stackoverflow.com/questions/5287121/undefined-method-task-using-rake-0-9-0

The version of Rack in updates-testing should suffice and thus when it is pushed to production this issue can be closed 

(this probably can be pushed to stable now, its been over a week since submission correct?)

https://admin.fedoraproject.org/updates/rubygem-rake-0.9.2-1.fc15

Comment 6 Mo Morsi 2011-06-24 00:29:19 UTC
Arg, sorry s/Rack/Rake in my last comment

Comment 7 Vít Ondruch 2011-06-24 05:24:01 UTC
(In reply to comment #5)

Ah, I was not aware that there is already updated rake in updates-testing. That was one of my suggestions how to fix the issue :) Good to know that.

Comment 8 Mamoru TASAKA 2011-06-24 12:26:57 UTC
Again please also fix this issue in rails side. Even with rake 0.9.2 you'll see deprecation warning and this may change to the error soon again.

Comment 9 Fedora Update System 2011-06-27 19:22:27 UTC
rubygem-railties-3.0.6-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/rubygem-railties-3.0.6-2.fc15

Comment 10 Vít Ondruch 2011-06-28 12:26:14 UTC
Hups ... railteis *3.0.6* that is not good :/

Comment 11 Vít Ondruch 2011-06-28 12:28:29 UTC
I have revoked the request, guess its possible to revert without epoch since this update have not hit any repo yet. Thoughts?

Comment 12 Vít Ondruch 2011-06-28 12:29:48 UTC
Hm, it is in rawhide already ... but there we should update to something new anyway.

Comment 13 Mo Morsi 2011-06-28 13:17:25 UTC
Arg sorry, should've noticed this update before proceeding. CC'ing minn here as he owns rubygem-railties and pushed 3.0.6

I believe the optimal solution would be to downgrade railties to 3.0.5 in F15 and update the entire rails stack to 3.0.9 in rawhide.

Unless there are any objections, I will proceed with this strategy momentarily.

Comment 14 Vít Ondruch 2011-06-29 05:44:40 UTC
(In reply to comment #13)
> Arg sorry, should've noticed this update before proceeding. CC'ing minn here as
> he owns rubygem-railties and pushed 3.0.6

Actually I own rubygem-railties. Unfortunately minn still have not singed the new CLA and doesn't seems to be responsive recently :/

Comment 15 Vít Ondruch 2011-06-29 06:45:41 UTC
So I reverted the 3.0.6 commit (unfortunately accidentally also in master, bad day :/ but since we are going to update master, it doesn't matter) and resubmitted the update: https://admin.fedoraproject.org/updates/rubygem-railties-3.0.5-2.fc15

Comment 16 Mo Morsi 2011-06-29 14:03:27 UTC
OK, looks good, thanks for taking care of this Vit

Comment 17 Fedora Update System 2011-06-29 21:52:19 UTC
Package rubygem-railties-3.0.5-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rubygem-railties-3.0.5-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/rubygem-railties-3.0.5-2.fc15
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2011-07-08 17:57:47 UTC
rubygem-railties-3.0.5-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2011-07-11 08:35:18 UTC
rubygem-railties-3.0.5-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/rubygem-railties-3.0.5-3.fc15

Comment 20 Fedora Update System 2011-07-22 19:27:08 UTC
rubygem-railties-3.0.5-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.