未定义的方法`end_with?' for“rake aborted!”:String(NoMethodError)

时间:2013-04-09 07:40:19

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-2

每当我输入rake db:migrate或rake -T时,我一直面临运行rake任务/命令的问题,它显示错误说未定义的方法`end_with?' for“rake aborted!”:String(NoMethodError)。使用ruby186,rails238和gem version 1.3.3

rake db:migrate
/home/projects/.rvm/gems/ruby-1.8.6-p420@global/gems/rubygems-bundler-1.1.0/lib/rubygems-bundler/regenerate_binstubs_command.rb:48: warning: parenthesize argument(s) for future version
/home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/trace_output.rb:14:in `trace_on': undefined method `end_with?' for "rake aborted!":String (NoMethodError)
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/trace_output.rb:14:in `map'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/trace_output.rb:14:in `trace_on'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:322:in `trace'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:176:in `display_error_message'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:169:in `standard_exception_handling'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/bin/rake:33
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/bin/rake:19:in `load'
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420@global/bin/rake:19
from /home/a3logics/.rvm/gems/ruby-1.8.6-p420/bin/ruby_noexec_wrapper:14

我被困在这里的任何帮助。

1 个答案:

答案 0 :(得分:0)

rake源中的错误,end_with?中的错误应该是trace_output.rb中的ends_with?。尝试使用不同版本的rake,我使用0.9.2.2没有任何问题。