views:

130

answers:

2

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)

A: 

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

Joseph U.
A: 

Got exactly the same problem, but not sure how you added "the Heroku path for GIT as a remote manually" - can you explain in more detail? Thanks

Ian
Sure but after I explain I will point you to an even better solution to avoid the error in the first place.#1. After you see the error go to your GIT Bash#2. git remote add heroku (GIT path provided in Heroku)#3. git push heroku masterThat will push the files to the heroku site, however I found out how to avoid the error entirely.Check out the answer to the following question: http://stackoverflow.com/questions/3426347/how-to-run-ruby-and-git-commands-in-one-place-on-windows
Joseph U.