我正在尝试使用“git push heroku master”将应用程序推送到heroku。
在我的 Gemfile 中,我有以下内容:
source 'https://rubygems.org'
ruby 'ruby 1.9.3'
gem 'foreman'
但是当我尝试推送到heroku时,出现以下错误:
! Invalid RUBY_VERSION specified: Gemfile-syntax-error:-<!DOCTYPE-html>-^-/tmp/build_o93twnijmxig/Gemfile:5:-syntax-error,-unexpected-'<'-<html>-^-/tmp/build_o93twnijmxig/Gemfile:7:-syntax-error,-unexpected-'<'-<meta-charset='utf-8'>-^-/tmp/build_o93twnijmxig/Gemfile:8:-syntax-error,-unexpected-'<'-<meta-http-equiv="X-UA-Compatible"-content="IE=edge">-^-/tmp/build_o93twnijmxig/Gemfile:8:-syntax-error,-unexpected-tIDENTIFIER,-expecting-$end-<meta-http-equiv="X-UA-Compatible"-content="IE=edge">-^
! Valid versions: ruby-1.9.3-p0, ruby-1.9.3-p125, rbx-1.2.4, rbx-2.0.0dev-20120115-1.9, rbx-2.0.0dev-20120115-1.8, rbx-2.0.0dev-20120123-1.9, rbx-2.0.0dev-20120123-1.8, ruby-1.9.2-p290, jruby-1.6.5.1, jruby-1.6.7, ruby-1.9.3, ruby-1.9.2, ruby-1.8.7, ruby-1.9.3-jruby-1.7.0.preview1, ruby-1.8.7-jruby-1.7.0.preview1, ruby-1.9.3-rbx-2.0.0dev, ruby-1.8.7-rbx-2.0.0dev
!
! Heroku push rejected, failed to compile Ruby app
当我输入:heroku config -s | grep PATH 我得到以下输出:
PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
并运行: heroku run "ruby -v" ,输出:
Running `ruby -v` attached to terminal... up, run.1
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
但是当我尝试在 app 目录中运行 bundle install 时,我收到了这个奇怪的消息:
Your Ruby version is 1.9.3, but your Gemfile specified ruby 1.9.3