[英]Why Heroku is still not using my Ruby version 1.9.3?
I followed every step in here: I have this in my gem file 我遵循了这里的每个步骤:我的gem文件中有这个
ruby "1.9.3"
and then when I deploy heroku says: 然后当我部署heroku时说:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using 1.5.2
Then when I do 那我做的时候
heroku run "ruby -v"
I still get 我仍然得到
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Then I added a path: 然后我添加了一条路径:
heroku config:set PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
Deployed again, and still same result: 再次部署,结果仍然相同:
I tried: 我试过了:
heroku config:set PATH=bin:vendor/bundle/ruby/1.9.3/bin:/usr/local/bin:/usr/bin:/bin
Still no use: 还是没用:
In my heroku Log I get this: 在我的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)
It kind of is driving me nuts, I can't get Heroku to use 1.9.3. 有点让我发疯,我无法让Heroku使用1.9.3。
I looked at the following questions as well: Ruby version is not upgrading on Heroku Is it possible to run my Rails app on Heroku with Ruby 1.9.3? 我也看了以下问题: Ruby版本不在Heroku上升级 是否可以在Ruby 1.9.3的Heroku上运行我的Rails应用程序? If so, how? 如果是这样,怎么办? How can I choose Ruby version on Heroku? 如何在Heroku上选择Ruby版本? Heroku cedar doesn't upgrade to ruby-1.9.3 Heroku雪松不会升级到ruby-1.9.3
Still can't get anywhere 仍然无法到达任何地方
After a very painful search by removing and adding stuff from my most recent commit I realized that a file . 经过一次非常痛苦的搜索之后,从我最近的提交中删除和添加了一些东西,我意识到了一个文件。 bash_profile
was added to my Rails Root app that had this in it: bash_profile
已添加到我的Rails Root应用程序中,其中包含以下内容:
export PGHOST=localhost
export PATH=/usr/local/bin:$PATH
So I just removed that, because this calls up the path to the Ruby version, the default one. 所以我刚刚删除了它,因为这调用了Ruby版本(默认版本)的路径。 I hope no one ends up making same mistake. 我希望没有人最终会犯同样的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.