我剛將Padrino從版本0.10.5升級到0.12.1,現在我的Rake任務都不再工作了。Padrino爲什麼找不到我的耙子任務?
我只是增加了一個簡單的例子:
# PROJECT_ROOT/lib/tasks/example_task.rake
task :example_task do
puts "Is this working?"
end
運行rake example_task
給出:
rake aborted!
Don't know how to build task 'example_task'
運行padrino rake example_task
給出:
=> Executing Rake example_task ...
/Users/george/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/rake/task_manager.rb:49:in `[]': Don't know how to build task 'example_task' (RuntimeError)
Padrino的docs說Padrino會自動檢測到任何*.rake
文件lib/tasks
,這些工作在我升級Padrino之前。有什麼問題?
我的Gemfile:
source 'https://rubygems.org'
ruby '2.1.0'
gem 'rake'
gem 'unicorn'
gem 'rack_hoptoad', require: 'rack/hoptoad'
gem 'haml'
gem 'bson_ext'
gem 'mongo'
gem 'mongoid', '~> 3.1.6'
gem 'httparty'
group :development, :test do
gem 'debugger'
gem 'fabrication', '~> 1.3.1'
gem 'zippy'
gem 'rubyzip', '~> 0.9.9'
end
group :test do
gem 'mocha', '~> 0.10.4'
gem 'rspec', '~> 2.8.0'
gem 'capybara', '~> 1.1.2'
gem 'launchy'
gem 'cucumber', '~> 1.1.8'
end
gem 'tilt', '~> 1.4.1'
gem 'padrino', '~> 0.12.1'
gem 'padrino-cookies', '~> 0.1.2'
據bundle show rake
,我用耙子版本10.3.1。
我在做什麼錯?
什麼是'耙-T'和'padrino耙-T'的輸出? – xlembouras