未定义的方法`end_with?'对于“rake aborted!":String (NoMethodError) [英] undefined method `end_with?' for "rake aborted!":String (NoMethodError)

查看:49
本文介绍了未定义的方法`end_with?'对于“rake aborted!":String (NoMethodError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我输入 rake db:migrate 或 rake -T 时,我都遇到运行 rake 任务/命令的问题,它显示错误,提示未定义的方法 `end_with?'对于 "rake aborted!":String (NoMethodError).使用 ruby​​186、rails238 和 gem 版本 1.3.3

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.

推荐答案

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

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.

这篇关于未定义的方法`end_with?'对于“rake aborted!":String (NoMethodError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆