安装 rvm、ruby、gem、rails、juggernaut 的命令

发布于 2024-12-21 15:50:21 字数 1354 浏览 0 评论 0原文

我在我的 Ubuntu1104 机器上一遍又一遍地这样做,有些东西总是让我发疯,比如:

The program 'ruby' is currently not installed.  You can install it by typing:
sudo apt-get install ruby

即使在安装了 ruby​​ 之后,它也明确表示“安装成功”。 另外:

rvm list 

告诉我:

rvm rubies

    ruby-1.9.2-p290 [ i686 ]

这:

which ruby
which gem

什么也不返回。

那么有人可以说明安装 ruby​​ 的正确顺序吗?它是像 Rails 和 Juggernaut 这样的宝石。我相信我在路径(系统找不到成功安装的好东西)和权限(有时必须使用 sudo,有时不需要,这可能是我遇到的路径问题的原因)方面遇到问题。因此,还请明确说明安装位置和使用权限。

我认为首先是 RVM(如 http://beginrescueend.com/rvm/install/ 中所述) :

1) bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
2) bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
3) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

然后是 Ruby(也安装 gem):

4) rvm 1.9.2

然后是像 Rails 和 juggernaut 这样的 gem,

5) gem install rails
6) gem install juggernaut
...

不幸的是我收到了上面发布的消息,“gem 未安装”和“ruby 未安装”。

另外,您还可以先安装 ruby​​,然后将 RVM 作为 gem 安装...令人困惑...

干杯,伙计们! 苹果

I've been doing it over and over again on my Ubuntu1104 machine and something always keeps driving me nuts, like:

The program 'ruby' is currently not installed.  You can install it by typing:
sudo apt-get install ruby

And that even after installing ruby, which clearly stated "installed successfully".
Also:

rvm list 

tells me:

rvm rubies

    ruby-1.9.2-p290 [ i686 ]

This:

which ruby
which gem

returns nothing.

So can someone please state the correct order to install ruby and it's gems like rails and juggernaut. I believe that I have trouble with paths (the system can't find successfully installed goodies) and rights (sometimes have to sudo and sometimes not, wich might be the cause for the path trouble I have). So please also give clear instructions on where to install and which rights to use.

I thought it's RVM first (as stated in http://beginrescueend.com/rvm/install/):

1) bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
2) bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
3) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

And then Ruby (which also installs gem):

4) rvm 1.9.2

And then the gems like rails and juggernaut

5) gem install rails
6) gem install juggernaut
...

Unfortunately I get a message as posted above, 'gem not installed' and 'ruby not installed'.

Plus you can also install ruby first and then install RVM as a gem... confusing...

Cheers mates!
Mac

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

陌伤ぢ 2024-12-28 15:50:21

您没有正确安装 rmv:
是什么意思

user$ type rvm | head -1
rvm is a function

如果这不是您所看到的,那么 do :

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc

重试

重新启动 bash 并在 do 之后

rvm --default use 1.9.2

you did not intsalled rmv correctly:
what does

user$ type rvm | head -1
rvm is a function

If this is not what you see, then do :

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc

restart bash and try again

after do

rvm --default use 1.9.2
半枫 2024-12-28 15:50:21

确保 rvm 使用 1.9.2,以防它不是默认版本

make sure you rvm use 1.9.2 in case it doesn't default

万劫不复 2024-12-28 15:50:21

应首先安装rvm

之后是宝石。我不明白 rvm 如何成为宝石,但可能是。

如果您在通过 rvm 选择 ruby​​ 后输入 which ruby​​ ,那么您的 rvm 安装有问题;通过删除您的主 .rvm 目录重新开始。

验证预期的命令是否在您的 .bashrc 中(在 Ubuntu 上,我没有 .bash_profile,这更多是 OS X 的事情,但可能是版本或设置差异而不是错误的)。您可以查看主目录中有哪些文件。

rvm should be installed first.

After that the gems. I don't see how rvm could be a gem, but could be.

If you type which ruby after selecting a ruby via rvm then something is wrong with your rvm installation; start over by deleting your home .rvm directory.

Verify the expected command is in your .bashrc (on Ubuntu I don't have a .bash_profile, that's more an OS X thing, but could be a version or setup difference rather than wrong). You can see what files are in your home directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文