gpt4 book ai didi

ruby-on-rails - 无法将应用程序推送到 heroku... env : bundle: No such file or directory

转载 作者:行者123 更新时间:2023-12-01 05:16:00 27 4
gpt4 key购买 nike

已经有一个应用程序运行了一段时间,但现在我不能 git push:

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3-p125
-----> Installing dependencies using
Fixing nokogiri install. Clearing bundler cache.
See https://github.com/sparklemotion/nokogiri/issues/923.
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
env: bundle: No such file or directory
Bundler Output: env: bundle: No such file or directory
!
! Failed to install gems via Bundler.
!

! Push rejected, failed to compile Ruby app

我检查了每个 https://github.com/heroku/heroku-buildpack-ruby/commit/00ae3eb09522028b692bfda15d4089b5531f0b79 的路径和 heroku 配置报告:
GEM_PATH:                   vendor/bundle/ruby/1.9.1
LANG: en_US.UTF-8
PATH: bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin

所以看起来路径是正确的,虽然我不明白为什么当我使用 1.9.3 时它是 ruby​​ 1.9.1。

Gemfile 包含:
source 'https://rubygems.org'

gem 'rails', '~>3.2'

FWIW 我尝试了捆绑更新并将更改提交给 gemfile.lock,但仍然无法推送它。

最佳答案

Heroku push is being rejected建议将 ruby​​ 版本添加到 gemfile 中,而另一篇文章则表示将其删除。无奈之下,我试了一下:

source 'https://rubygems.org'
ruby "1.9.3"
gem 'rails', '~>3.2'

然后我做了一个包更新(可能是不必要的)并推送它:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.2
Ruby version change detected. Clearing bundler cache.
Old: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
New: ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
Fixing nokogiri install. Clearing bundler cache.
See https://github.com/sparklemotion/nokogiri/issues/923.
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.1.0)

...

成功! ...直到我遇到下一个问题,但这与这篇文章无关。

关于ruby-on-rails - 无法将应用程序推送到 heroku... env : bundle: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20536062/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com