2013-12-12 68 views
4

有無有一個應用程序並工作了一段時間,但現在我不能混帳推:無法推動應用的Heroku ... ENV:束:沒有這樣的文件或目錄

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

所以它看起來像路徑是正確的,雖然我不明白爲什麼它的Ruby 1.9.1當我使用的是1.9.3。

Gemfile中包含:

source 'https://rubygems.org' 

gem 'rails', '~>3.2' 

FWIW我已經嘗試了包更新和comitted到Gemfile.lock的變化,但仍無法推動它。

回答

1

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) 

     ... 

成功! ......直到我遇到下一個問題,但與這篇文章無關。

0

對我來說這事,因爲我有這樣的引用以前的Ruby版本真的老了環境變量:

PATH:  bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin 

我只是刪除它,一切都開始工作:

heroku config:remove PATH 
相關問題