Herkuku工具带的问题 [英] Problems with heroku toolbelt
问题描述
我已经使用<$ c安装了heroku工具栏$ c> wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | SH 。我也试过 gem install heroku
。但是当我输入:
MY_USER @ home-PC:〜$ heroku version
: 1:在`require'中:无法加载这样的文件 - rubygems.rb(LoadError)
from< internal:gem_prelude>:1:在<编译>'
我在google中检查过,人们建议gem和当前的ruby是不同的版本,所以我检查过它们,它们看起来是一样的:
MY_USER @ home-PC:〜$ which ruby
$ p $ > b
/home/MY_USER/.rvm/rubies/ruby-1.9 .3-p327 / bin / ruby
MY_USER @ home-PC:〜$ gem env | grep'RUBY EXECUTABLE'
- RUBY EXECUTABLE:/home/MY_USER/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
我不知道该做什么更多,请帮忙。
对不起,可能是愚蠢的问题,谢谢
编辑:
忘记说我正在运行Ubuntu 12.10。解决方案问题是您安装的
heroku
可执行文件可能以这样的一行开头:#!/ usr / bin / ruby
将强制
heroku
命令始终使用系统范围的ruby(/ usr / bin / ruby
),它会永远不要运行你的rvm版本的ruby。
要修复它,只需编辑
heroku
脚本的第一行到这个:#!/ usr / bin / env ruby
这将使
heroku
命令运行,无论哪个ruby命令处于当前PATH
,而不是以前的硬编码路径。
要找到
heroku
脚本,所以你可以编辑它,只需键入:
哪个heroku
...在您的命令行上。它应该打印脚本的位置,以便您可以找到它并将其加载到编辑器中。
I'm absolute newbie in Ruby and Rails project, so I'm sorry if this is dumb question.
I've installed heroku toolbelt using
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
. Also I triedgem install heroku
. But when I type:MY_USER@home-PC:~$ heroku version <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>'
I've checked in google and people suggest that gem and current ruby are different versions so I've checked it and they seem to the same:
MY_USER@home-PC:~$ which ruby /home/MY_USER/.rvm/rubies/ruby-1.9.3-p327/bin/ruby MY_USER@home-PC:~$ gem env | grep 'RUBY EXECUTABLE' - RUBY EXECUTABLE: /home/MY_USER/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
I have no idea what to do more, so please help.
Sorry for the maybe stupid question, thanks in advance.
EDIT: Forgot to say I'm running Ubuntu 12.10.
解决方案The problem is that the
heroku
executable you installed probably starts with a line like this:#!/usr/bin/ruby
This will force the
heroku
command to always use the system-wide ruby (/usr/bin/ruby
) and it will never run your rvm version of ruby.To fix it simply edit the first line of the
heroku
script to this:#!/usr/bin/env ruby
This will make the
heroku
command run whichever ruby command is in the currentPATH
, instead of a hard coded path like previously.To find the location of the
heroku
script, so you can edit it, simply type:which heroku
...on your command line. It should print out the location of the script so you can find it and load it into your editor.
这篇关于Herkuku工具带的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文