ruby - Can't deploy Rails app to Heroku, "Invalid RUBY_VERSION" -
i'm trying push app heroku, can't past error:
delta compression using 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 compile ruby/rails app git@heroku.com:myapp.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed push refs 'git@heroku.com:myapp.git'
i'm running ruby 1.9.3p448. followed steps here, , top of gemfile includes:
source 'http://rubygems.org' ruby '1.9.3' gem 'rails', '3.2.13'
when run "heroku run 'ruby -v'" returns ruby 1.9.2p290. what's going on?
edit: here's whole gemfile:
source 'http://rubygems.org' ruby '1.9.3' gem 'rails', '3.2.13' gem 'pg' group :assets 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 gem 'better_errors' end
you have error in gemfile
, in line require 'addressable/uri'
. can’t use require
inside gemfile
. load path hasn’t been set yet, loaderror
bundler catches , produces error message.
heroku trying use bundle platform --ruby
determine version of ruby want use, not detecting error condition , treating error message version. not valid version, , produces error seeing.
i’m guessing you’re using require
because use addressable gem need require either addressable/uri
or addressable/template
(or both) , can’t use require 'addressable'
. in case can use :require
option of bundler:
gem 'addressable', :require => 'addressable/uri'
if need require more 1 thing, can use array:
gem 'addressable', :require => ['addressable/uri', 'addressable/template']
Comments
Post a Comment