Reputation: 2644
Have had an app up and working for some time, but now I cannot 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
I checked the path per https://github.com/heroku/heroku-buildpack-ruby/commit/00ae3eb09522028b692bfda15d4089b5531f0b79 and heroku config reports:
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
so it looks like the path is correct, although I don't understand why it's ruby 1.9.1 when I'm using 1.9.3.
Gemfile contains:
source 'https://rubygems.org'
gem 'rails', '~>3.2'
FWIW I have tried a bundle update and comitted the change to gemfile.lock, but still unable to push it.
Upvotes: 4
Views: 446
Reputation: 9779
For me this happened because I had a really old environment variable that referenced a previous Ruby version:
PATH: bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
I just removed it and everything started working:
heroku config:remove PATH
Upvotes: 0
Reputation: 2644
Heroku push is being rejected recommended adding ruby version to gemfile, while another post said to take it out. Out of desperation, I tried it:
source 'https://rubygems.org'
ruby "1.9.3"
gem 'rails', '~>3.2'
Then I did a bundle update (was probably unnecessary) and pushed it:
-----> 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)
...
Success! ...until I hit the next problem, but it's unrelated to this post.
Upvotes: 1