Heroku Bundle Error (Rails App)

I'm new to Ruby on Rails, the application runs on the local machine

local package works

however, when I try to execute git push heroku master , this is the error I get:

remote: 
remote: -----> Ruby/Rails app detected
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using 
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
remote:        /usr/bin/env: ruby1.9.1: No such file or directory
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:  !     Heroku push rejected, failed to compile Ruby/rails app
remote: 

my gemfile :

source 'http://rubygems.org'
ruby '1.9.3' 
gem 'rails', '4.0.0.beta1'

group :development, :test do
  gem 'sqlite3'
  gem 'rspec-rails'
end

group :assets do
  gem 'sass-rails',   '~> 4.0.0.beta1'
  gem 'coffee-rails', '~> 4.0.0.beta1'

  gem 'therubyracer', platforms: :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

gem 'turbolinks'
gem 'jbuilder', '~> 1.0.1'
group :test do
  gem 'capybara'
end

group :production do
  gem 'pg'
end

What am I missing? early!

+5
source share
2 answers

I had a similar problem. The problem is that the Bundler generates stubs. Rails 4 applications do not store stubs in the bin / directory. To fix this problem, you need to use the following commands:

$ bundle config --delete bin

Then you need to update the bin directory to use the new Rails 4 executables

$ rake rails:update:bin

bin/ , :

$ git add bin

Heroku

+9

ruby ​​ PATH. , ,

$ heroku run "ruby -v"
Running `ruby -v` attached to terminal... up, run.8734
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

? , .

$ heroku config -s | grep PATH
GEM_PATH=vendor/bundle/ruby/1.9.1
PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin

bin . PATH bin, .

$ heroku config:set PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
+1

All Articles