我的操作系统是 windows 7,我正准备将我的本地 MySQL 数据库连接到 Heroku 共享数据库,有一次,我得到了 libmysql.dll 文件丢失的错误,所以我搜索并下载了 dll 文件并保存它在 ruby/bin 目录中。当我再次连接时,这次它显示错误 ruby.exe 未被识别为内部或外部命令,这就是错误的样子。
发送模式
'"ruby.exe"' is not recognized as an internal or external command,TA: --:--:--
operable program or batch file.
'"ruby.exe"' is not recognized as an internal or external command,TA: 00:00:07
operable program or batch file.
'"ruby.exe"' is not recognized as an internal or external command,TA: 00:00:04
operable program or batch file.
'"ruby.exe"' is not recognized as an internal or external command,TA: 00:00:02
operable program or batch file.
'"ruby.exe"' is not recognized as an internal or external command,TA: 00:00:01
operable program or batch file.
架构:100% |==========================================|时间:00:00:06 '"ruby.exe"' 未被识别为内部或外部命令, 可运行的程序或批处理文件。
C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/lib/vendor/okj
son.rb:82:in `valparse': unexpected nil (OkJson::ParserError)
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/vendor/okjson.rb:64:in `textparse'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/vendor/okjson.rb:43:in `decode'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/taps/operation.rb:419:in `push_indexes'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/taps/operation.rb:408:in `block in run'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/taps/operation.rb:203:in `call'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/taps/operation.rb:203:in `catch_errors'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/taps/operation.rb:405:in `run'
from C:/Program Files/Heroku/ruby/lib/ruby/gems/1.9.1/gems/taps-0.3.23/l
ib/taps/cli.rb:171:in `clientxfer'
from C:/Users/JOE ARPUTHAN/.heroku/client/lib/heroku/command/db.rb:194:i
n `taps_client'
from C:/Users/JOE ARPUTHAN/.heroku/client/lib/heroku/command/db.rb:35:in
`push'
from C:/Users/JOE ARPUTHAN/.heroku/client/lib/heroku/command.rb:129:in `
run'
from C:/Program Files/Heroku/heroku:27:in `<main>'
最佳答案
您的 PATH 变量中没有 ruby.exe 的路径。
在 Windows 7 中,您可以通过 开始菜单 -> 右键单击 我的电脑 -> 左侧最后一个选项(我认为是 高级设置) -> Environment variables -> 在 system variables 子菜单中找到 Path 双击并添加;然后是 ruby 安装的 bin 文件夹的路径。这应该可以修复它(您将需要重新启动所有已启动的命令提示符)。
关于ruby - Windows 7 中的 "ruby.exe is not recognized as an internal or external command",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9852259/