Ruby.exe is not recognized when trying to log in and use heroku

When I try to create a heroku application and clicking on it with git, I get the following error:

$ heroku create ' "C:\Program Files <x86>\ruby-1.9.2\bin\ruby.exe" is not recognized as an internal or external command, operable program or batch file. 

However

 $ ruby -v ruby 1.9.3p125 <2012-02-16> [i386-mingw32] 

I checked the PATH environment and it definitely contains "C: \ Program Files (x86) \ ruby-1.9.2 \ bin". It is also interesting that when navigating this directory, in fact, it does not contain a file named ruby.exe. This is normal?

Why, when I specifically try to install in Heroku, does this error occur? I have no idea what is happening ... please help!

+6
source share
2 answers

Also a newbie here, trying to get rails with the launch of heroku. Today I faced the same problem: first the problem “Could not find RubyGem railties”, and then after removing Ruby 1.9.2 the problem with heroku no longer works. I found 2 paths around it, but not sure if one of them is magnificent.

Do not remove the ruby ​​version that comes with the dashboard. Instead either

(1): remove it from PATH. For me, installing the toolbelt added c: \ program files \ ruby1.9.3 to my system PATH variable. I already had c: \ ruby193 (where I installed ruby ​​earlier) in the PATH user variable. After you removed the one added by toolbelt from PATH, everything began to work. (note: c: \ ruby193 should be placed before c: \ program files \ heroku \ bin in the PATH system variable, otherwise it will not work)

(2): as an alternative, I moved c: \ ruby193 from my user PATH to my PATH system. Reinstall toolbelt, and now both rubies and heroics work. But I have both versions of ruby ​​in my PATH variable.

Not sure if that's cool anyway, because I suspect I now have two versions of rubies that are installed and used depending on what I'm doing. But at least he allowed me to move on to the next problem, now I'm stuck in an attempt to install plugins for the hero.

I thought that a ruby ​​on rails should ease the situation. It was a 4 day attempt to tune 30 different new tools (end rant)

+3
source

Another thing you can do (it works for me) is to modify the \ bin \ heroku.bat file.

In the file, a link to the installation path of Heroku Ruby is marked in Program Files. It is installed by default during installation. Go to the current Ruby installation path.

In my case, I want only one version of ruby ​​on my machine. So, I removed the ruby ​​that comes with the hero, and installed 1.9.3. And just changed the batch file.

Hope this helps. Enjoy it.

+2
source

All Articles