git 使用 heroku 部署 sinatra 应用程序时遇到问题

发布于 2024-11-09 01:58:59 字数 1379 浏览 0 评论 0原文

我刚刚开始接触这些东西,所以欢迎并感谢任何帮助。提前致谢!

我已经编写了一个 Sinatra 应用程序并部署到 Heroku,但某处存在错误。运行某些heroku命令(例如heroku open或heroku log)会在以下错误中响应(此处显示“heroku日志”)。我已经安装了 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>'

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>'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤城病女 2024-11-16 01:58:59

当您安装 msysgit 时,您可能选择了“Git Bash Only”选项,这会阻止您从命令行运行 git(这正是应用程序试图执行的操作)。 在此处查找正确的安装演练。

您需要将 msysgit 路径添加到 PATH 环境变量中。 查看此处的说明。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文