我正在尝试将我的应用程序推送到 Heroku,但我无法克服此错误:
Delta compression using up to 2 threads.
Compressing objects: 100% (1554/1554), done.
Writing objects: 100% (1652/1652), 23.93 MiB | 369 KiB/s, done.
Total 1652 (delta 859), reused 0 (delta 0)
-----> Ruby/Rails app detected
!
! Invalid RUBY_VERSION specified: There-was-an-error-in-your-Gemfile,-and-Bundler- cannot-continue.
! Valid versions: ruby-2.0.0, ruby-1.9.3, ruby-1.9.2, ruby-1.8.7, ruby-1.9.3-jruby- 1.7.0, ruby-1.8.7-jruby-1.7.0, ruby-1.9.3-jruby-1.7.1, ruby-1.8.7-jruby-1.7.1, ruby-1.9.3-rbx-2.0.0dev, ruby-1.8.7-rbx-2.0.0dev
!
! Push rejected, failed to compile Ruby/Rails app
To git@heroku.com:myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:myapp.git'
我正在运行 ruby 1.9.3p448。我按照这里的步骤操作,我的 Gemfile 的顶部包括:
source 'http://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.13'
当我运行“heroku run 'ruby -v'”时,它返回 ruby 1.9.2p290。这是怎么回事?
编辑:这是我的整个 Gemfile:
source 'http://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.13'
gem 'pg'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'devise'
gem 'nokogiri'
gem 'i18n'
gem 'paperclip'
gem 'kaminari'
gem 'rest-client'
require 'addressable/uri'
group :development do
gem 'better_errors'
end