git 使用 heroku 部署 sinatra 应用程序时遇到问题
我刚刚开始接触这些东西,所以欢迎并感谢任何帮助。提前致谢!
我已经编写了一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您安装 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.