undefined method `end_with?' for “rake aborted!”:String (NoMethodError)

大兔子大兔子 提交于 2019-12-11 18:22:40

问题


I have been facing problem running rake task/commands whenever I type rake db:migrate or rake -T, it is displaying error saying undefined method `end_with?' for "rake aborted!":String (NoMethodError).Using ruby186, rails238 and 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

Any help I got stuck here.


回答1:


Looks like an error in the rake source, end_with? should be ends_with? in trace_output.rb. Try a different version of rake, I use 0.9.2.2 without any problems.



来源:https://stackoverflow.com/questions/15896073/undefined-method-end-with-for-rake-abortedstring-nomethoderror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!