I'm trying to push an app to heroku using "git push heroku master".
我正在尝试使用“git push heroku master”向heroku推送一个应用程序。
In my Gemfile, I have the following:
在我的Gemfile中,我有以下内容:
source 'https://rubygems.org'
ruby 'ruby 1.9.3'
gem 'foreman'
but when I try to push to heroku, I get the following error:
但是当我试图推到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
When I enter: heroku config -s | grep PATH I get the following output:
输入:heroku config -s | grep路径,得到如下输出:
PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
and running: heroku run "ruby -v" ,outputs:
运行:heroku运行“ruby -v”,输出:
Running `ruby -v` attached to terminal... up, run.1
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
But when I try to run bundle install in the app directory, I get this strange message:
但是当我尝试在app目录中运行bundle install时,我得到了一个奇怪的消息:
Your Ruby version is 1.9.3, but your Gemfile specified ruby 1.9.3
1 个解决方案
#1
8
source 'https://rubygems.org'
ruby '1.9.3'
gem 'foreman'
#1
8
source 'https://rubygems.org'
ruby '1.9.3'
gem 'foreman'