git用heroku部署sinatra应用程序

时间:2011-05-21 17:42:30

标签: git heroku sinatra datamapper

我刚刚开始研究这些东西,所以任何帮助都是受欢迎和赞赏的。提前谢谢!

我已经编写了一个Sinatra应用程序并部署到Heroku,但某处有一个bug。运行某些heroku命令(如heroku open或heroku日志)会在以下错误中响应(此处显示为“heroku logs”)。我已经安装了Git Bash和一个git gem,但在命令行中使用git不起作用。

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 个答案:

答案 0 :(得分:3)

当您安装msysgit时,您可能选择了“Git Bash Only”选项,这会阻止您从命令行运行git(这是应用程序尝试执行的操作)。 Look here for a proper installation walkthrough.

您需要将msysgit路径添加到PATH环境变量。 Look here for instructions.