我正在尝试运行命令rake db:migrate,但终端正在抱怨文件
ruby_executable_hooks中可能的语法错误.我发现这个
reference,但没有帮助我解决问题.在文件的第一行,它看起来像title =“ruby#{ARGV *”“}”导致问题,因为双引号没有正确转义.我尝试过不同的逃脱组合,但还是没有运气.所以现在我不知道这个问题是否真的与逃避问题或其他问题有关.非常感谢
请参阅下面的ruby_executable_hooks文件
title = "ruby #{ARGV*" "}" $0 = ARGV.shift Process.setproctitle(title) if Process.methods.include?(:setproctitle) require 'rubygems' begin require 'executable-hooks/hooks' Gem::ExecutableHooks.run($0) rescue LoadError warn "unable to load executable-hooks/hooks" if ENV.key? ('ExecutableHooks_DEBUG') end eval File.read($0),binding,$0
错误信息:
/Users/username/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval': /Users/username/.rvm/rubies/ruby-2.2.3/bin/rake:4: Syntax error,unexpected tSTRING_BEG,expecting keyword_do or '{' or '(' (SyntaxError) exec "$bindir/ruby" -x "$0" "$@" ^ from /Users/username/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'