" Some time passed without...">

Rake db: migrate fails with the error: "rake aborted! Undefined method` deprecate 'for # <Rake :: Application: 0x1e0c6c0>"

Some time passed without programming on the rails, and now that I have "returned", everything went wrong. I installed ruby ​​1.9.2-p0 and is attached to rails 3.0.1. Updated all planes and packages successfully. Created a new rails application and created a migration, but at startup

rake db:migrate 

I get:

 rake aborted! undefined method `deprecate' for #<Rake::Application:0x1e0c6c0> C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb:4:in `<top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/tasks/documentation.rake:1:in `require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/tasks/documentation.rake:1:in `<top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/tasks.rb:15:in `load' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/tasks.rb:15:in `block in <top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/tasks.rb:6:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/tasks.rb:6:in `<top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:213:in `require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:213:in `initialize_tasks' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:139:in `load_tasks' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:77:in `method_missing' D:/sites/hebrew_learning/Rakefile:7:in `<top (required)>' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `load' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile' C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run' C:/Ruby192/bin/rake:31:in `<main>' 

I'm really lost here, so any advice would be much appreciated

EDIT:

After launch

 bundle exec rake 

I get:

 WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. at C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb 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 HebrewLearning::Application#task called at C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:214:in `initialize_tasks' You have 1 pending migrations: 20111104081644 CreateUsers Run "rake db:migrate" to update your database then try again. 
+4
source share
1 answer

If you are using rails 3.0.1, you can try this in your gemfile:

 gem 'rake' , '0.8.7' 

or try upgrading to version 3.0.9 in your gemfile.

After this run:

 bundle update 

Bye

+1
source

Source: https://habr.com/ru/post/1379677/


All Articles