我一直在研究教程的Ruby on Rails应用程序不起作用。我之前通过Git程序做了同样的推动,它正在工作。现在它显示以下错误,我做错了什么?
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
/usr/bin/env: ruby1.9.1: No such file or directory
Bundler Output: /usr/bin/env: ruby1.9.1: No such file or directory
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby/Rails app
To git@heroku.com:aqueous-savannah-3944.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:aqueous-savannah-3944.git'
以下是该应用的GemFile
source 'https://rubygems.org'
gem 'rails'
group :development do
gem 'sqlite3'
gem 'rspec-rails'
end
group :test do
gem 'capybara'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'jquery-rails'
gem 'turbolinks'
group :production do
gem 'pg'
end
答案 0 :(得分:1)
这可能是由您的PATH问题引起的。请尝试以下方法:
heroku run "ruby -v"
你应该得到关于你的ruby版本的东西。如果出现问题,请使用以下命令:
heroku config -s | grep PATH
如果bin
不在您的路径中,您应该可以使用:
heroku config:set PATH=/bin:$PATH
希望有所帮助!
答案 1 :(得分:0)
在Gemfie中设置Ruby版本并再试一次
ruby "1.9.3"