Hide Forgot
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.
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.
(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.
(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.
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.
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
Arg, sorry s/Rack/Rake in my last comment
(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.
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.
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
Hups ... railteis *3.0.6* that is not good :/
I have revoked the request, guess its possible to revert without epoch since this update have not hit any repo yet. Thoughts?
Hm, it is in rawhide already ... but there we should update to something new anyway.
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.
(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 :/
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
OK, looks good, thanks for taking care of this Vit
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).
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.
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
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.