Windows 7中“ruby.exe未被识别为内部或外部命令”

我的操作系统是Windows 7,我正准备将我的localhost 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 `' 

您的PATH变量中没有ruby.exe的路径。

在Windows 7中你可以通过Start menu设置它 – >右键单击My computer – >左边的最后一个选项(我认为它是advanced settings ) – >环境变量 – >在system variables子菜单中找到Path双击它并添加; 然后是ruby安装的bin文件夹的路径。 这应该修复它(您需要重新启动所有已启动的命令提示)。