Rake + Git Bash = Woes
Hey, what's up? Nice to see ya. You look good.
This is a pretty random thing to post after an eight month absence, but I don't feel like creating an account on rubyforge.org to post a reply there to this thread:
http://rubyforge.org/tracker/index.php?func=detail&aid=22539&group_id=167&atid=715
That's six months old at this point, but it's high on the Google results for the error I was having, which was occurring while trying to use rake or gem from within a git bash shell
This seems to have been a fancy way of saying "bad path".
Anyway, after installing Ruby with the one-click, I had to open the script files for both rake and gem (those exact file names, no extensions) in my Ruby/bin folder, and replace "D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe" with my Ruby/bin path (C:\Ruby\bin).
Rake and Gem worked fine in git bash after that, but I beat my head against this for a while, so hopefully can keep someone else from doing the same. Note that rake and gem worked just fine from a Windows command prompt, even before replacing the paths.
I also see that I'm going to have to fix these newfangled post labels if I'm going to use them.
This is a pretty random thing to post after an eight month absence, but I don't feel like creating an account on rubyforge.org to post a reply there to this thread:
http://rubyforge.org/tracker/index.php?func=detail&aid=22539&group_id=167&atid=715
That's six months old at this point, but it's high on the Google results for the error I was having, which was occurring while trying to use rake or gem from within a git bash shell
$ gem
sh.exe": /c/Ruby/bin/gem: D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe^M: bad interpreter: no medium
This seems to have been a fancy way of saying "bad path".
Anyway, after installing Ruby with the one-click, I had to open the script files for both rake and gem (those exact file names, no extensions) in my Ruby/bin folder, and replace "D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe" with my Ruby/bin path (C:\Ruby\bin).
Rake and Gem worked fine in git bash after that, but I beat my head against this for a while, so hopefully can keep someone else from doing the same. Note that rake and gem worked just fine from a Windows command prompt, even before replacing the paths.
I also see that I'm going to have to fix these newfangled post labels if I'm going to use them.


1 Comments:
it works at the cmd.exe prompt as cmd isn't going to consider "gem" an executable, and will resolve "gem" to mean "gem.bat". which just passes gem as a param to ruby.exe
Post a Comment
<< Home