我是Rails和一般编程的新手(目前正在使用3.0.1和ruby 1.9.2的书中学习)。在Rails中的弃用警告
当我做了rake db:migrate命令时,我得到了下面的弃用警告。我不确定这是因为我使用的是Rails的稍旧版本,还是因为版本而发生这种情况。无论如何,任何人都可以告诉我,如果我现在应该做什么?
由于我是一个新手,详细的答案将不胜感激。干杯
$ rake db:migrate
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 SampleApp::Application#task called at /Users/michaeljohnmitchell/.rvm/gems/[email protected]/gems/railties-3.0.1/lib/rails/application.rb:214:in `initialize_tasks'
更新与Rake文件
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake'
SampleApp::Application.load_tasks
您能否显示您的rakefile? – nathanvda
我用我的rake文件更新了OP。感谢您的关注。 – Leahcim