2013-06-27 33 views
0

Rake在升級到Rails 4之後無法運行,並且在升級我的寶石之前運行正常。我在Ruby 1.9.3上。出於某種原因,rdoc無法識別標記屬性,但我找不到任何關於它被刪除或重命名的內容。Rake RDoc使用Rails 4的錯誤

這是我收到的錯誤消息。

相關的代碼片段(完整deploy.rake未顯示)

RollOut::DeployTask.new do |d| 
d.test = RSpec::Core::RakeTask.new 
d.doc = RDoc::Task.new :doc do |rdoc| 
    rdoc.rdoc_files.include('README.md', 'lib/**/*.rb', 'app/**/*.rb') 
    rdoc.rdoc_dir = 'target/doc' 
    rdoc.markup = 'tomdoc' 
end 

完整的跟蹤:

> RAILS_ENV=production rake assets:precompile --trace       
rake aborted! 
undefined method `markup=' for #<RDoc::Task:0x007fb4b46be660> 
/Users/rust/test_app/lib/tasks/deploy.rake:16:in `block (2 levels) in 
<top (required)>' 
/Users/rust/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/rdoc/task.rb:158:in 
`initialize' 
/Users/rust/test_app/lib/tasks/deploy.rake:14:in `new' 
/Users/rust/test_app/lib/tasks/deploy.rake:14:in `block in <top 
(required)>' 
/Users/rust/roll_out/lib/roll_out/deploy_task.rb:73:in `initialize' 
/Users/rust/test_app/lib/tasks/deploy.rake:12:in `new' 
/Users/rust/test_app/lib/tasks/deploy.rake:12:in `<top (required)>' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport- 
4.0.0/lib/active_support/dependencies.rb:222:in `load' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport- 
4.0.0/lib/active_support/dependencies.rb:222:in `block in load' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-  
4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport- 
4.0.0/lib/active_support/dependencies.rb:222:in `load' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties- 
4.0.0/lib/rails/engine.rb:641:in `block in run_tasks_blocks' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties- 
4.0.0/lib/rails/engine.rb:641:in `each' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties- 
4.0.0/lib/rails/engine.rb:641:in `run_tasks_blocks' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties- 
4.0.0/lib/rails/application.rb:244:in `run_tasks_blocks' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties- 
4.0.0/lib/rails/engine.rb:446:in `load_tasks' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties- 
4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing' 
/Users/rust/test_app/Rakefile:7:in `<top (required)>' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/rake_module.rb:25:in `load' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:94:in `block in load_rakefile' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:165:in `standard_exception_handling' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:93:in `load_rakefile' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:77:in `block in run' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:165:in `standard_exception_handling' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake- 
10.1.0/lib/rake/application.rb:75:in `run' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-10.1.0/bin/rake:33:in `<top 
(required)>' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/rake:23:in `load' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/rake:23:in `<main>' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `eval' 
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `<main>' 

有沒有人有任何想法,這可能是造成這和/或如何解決它?

回答

0

如果我將gem'rdoc'添加到我的gem文件中,錯誤似乎消失。我不確定爲什麼這會產生任何影響,因爲它已經是另一個寶石的依賴關係