3
votes

In a windows environment I am getting the following error when trying to deploy to Heroku

C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/base.rb:32:in ': No such file or directory - git remote (Errno::ENOENT) from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ba se.rb:32:in shell' from C:/Ruby/lib/ruby/1.8/fileutils.rb:121:in chdir' from C:/Ruby/lib/ruby/1.8/fileutils.rb:121:in cd' from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ba se.rb:32:inshell' from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ap p.rb:52:in create' from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb: 48:insend' from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb: 48:in run_internal' from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb: 20:inrun' from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/bin/heroku:13 from C:/Ruby/bin/heroku:19:in `load' from C:/Ruby/bin/heroku:19

Any idea how I can correct this? This is being run from the Ruby Command line (which seems to me like the regular command line)

2
from your shell, can you type 'git' and get some sensible return from the prompt?Jed Schneider

2 Answers

2
votes

Ok so I figured out a way to make it work and why it is likely happening.

For some reason I can only run the Ruby commands from the CMD prompt however the GIT commands only seem to work from the GIT Bash. When in the GIT Bash the Ruby commands don't work.

When you run the Heroku commands to create the service it seems to want to run certain GIT commands which don't work from the CMD prompt the way I have it set up.

To get around this for the moment I am adding the Heroku path for GIT as a remote manually and then pushing that manually when needed. An extra step but everything still works as intended.

If you need help with the work around check out the information in this link: http://www.wiki.devchix.com/index.php?title=Working_around_the_%22heroku_create%22_error

0
votes

I'd still recommend using Git Bash over the normal windows CMD prompt.. but I know how tedious that can be sometimes.

You can bypass the need to do this however and get your Heroku gem working properly in your windows CMD prompt by adding your msysgit/bin path to your system Path variable.

That'll give your heroku gem access to the git command.

To add heroku as remote use the following:

git remote add heroku [email protected]:yourappname.git

Then push your master copy to Heroku:

git push heroku master