0
votes

I'm just now getting into this stuff, so any help is welcome and appreciated. Thanks in advance!

I've written a Sinatra application and deployed to Heroku, but there is a bug somewhere. Running certain heroku commands like heroku open or heroku logs respond in the below error (here, shown for 'heroku logs'). I've installed Git Bash and a git gem, but using git in the command line doesn't work.

C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/helpers.rb:111:in ``
': No such file or directory -  git --version  (Errno::ENOENT)
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/helpers
.rb:111:in `has_git?'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/helpers
.rb:116:in `git'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/command
/base.rb:188:in `git_remotes'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/command
/base.rb:166:in `extract_app_in_dir'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/command
/base.rb:158:in `extract_app'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/command
/base.rb:210:in `app'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/command
/logs.rb:30:in `index'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/lib/heroku/command
.rb:117:in `run'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.1.3/bin/heroku:14:in `
'
        from C:/Ruby192/bin/heroku:19:in `load'
        from C:/Ruby192/bin/heroku:19:in 'main>'
1
Have you tried running this command from the git bash instead of command prompt?hwrdprkns
I just now tried, but it didn't work. I don't think Git knows anything about the Heroku gemdchang
You ran Git Bash, and from its prompt you did git --version, and it didn't work? What was the error message?Olivier L.
@olivier - Git Bash should be correctly installed. I've gotten version 1.7.4 installed from running git --version. My main problem was having heroku recognize git, as that seemed to be the root of the error i was receivingdchang

1 Answers

3
votes

When you installed msysgit, you probably chose the "Git Bash Only" option, which prevents you from running git from the command line (which is what the application is trying to do). Look here for a proper installation walkthrough.

You need to add the msysgit path to the PATH environment variable. Look here for instructions.