2014-03-26 59 views
0

我也跟着在這裏的每一步: 我有這個在我的寶石文件爲什麼Heroku還沒有使用我的Ruby版本1.9.3?

ruby "1.9.3" 

,然後當我部署的Heroku說:

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-1.9.3 
-----> Installing dependencies using 1.5.2 

後來,當我做

heroku run "ruby -v" 

我仍然得到

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] 

然後我添加了一個路徑:

heroku config:set PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin 

再部署,並仍然相同的結果:

我想:

heroku config:set PATH=bin:vendor/bundle/ruby/1.9.3/bin:/usr/local/bin:/usr/bin:/bin 

仍然沒有使用:

在我的Heroku的日誌我得到這個:

/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:390:in `validate_ruby!': Your Ruby version is 1.9.2, but your Gemfile specified 1.9.3 (Bundler::RubyVersionMismatch) 

的的確是我發瘋,我不能讓Heroku的使用1.9.3。

我看着下面的問題還有: Ruby version is not upgrading on Heroku Is it possible to run my Rails app on Heroku with Ruby 1.9.3? If so, how? How can I choose Ruby version on Heroku? Heroku cedar doesn't upgrade to ruby-1.9.3

仍不能去除,並從我最近添加的東西隨時隨地

+0

@Casper我可能會感到困惑對不起你,但實際上我想我的應用程序使用紅寶石「1.9.3」。所以,是的,我的Gemfile中有紅寶石「1.9.3」,這意味着Heroku可能會挑選它。 但是我仍然試圖通過這些步驟來選擇版本。 – 0bserver07

+0

您的應用程序可能正在使用Ruby 1.9.3。你在這裏所知道的是'heroku run'ruby -v「'不使用它。 –

+0

@NickVeys什麼在我的Heroku的日誌中的錯誤:/?我不能運行它口口聲聲說'紅寶石版本是1.9.2,但你的Gemfile指定1.9.3' – 0bserver07

回答

0

一個非常痛苦的搜索後提交我意識到一個文件。 bash_profile加入到我的Rails應用程序的根在它有這樣的:

export PGHOST=localhost 
export PATH=/usr/local/bin:$PATH 

所以我就刪除了,因爲這個調出路徑的Ruby版本,默認的。 我希望沒有人最終會犯同樣的錯誤。

相關問題