Okie dokie-它最近更新了我的系统到lion,新安装。
我按照Federico Araujo博客上的说明准备安装(http://www.frederico-Araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/),除了我使用的

    curl -L get.rvm.io | bash -s stable --rails

http://beginrescueend.com/rvm/install/开始处理rvm/rubygems/rails安装未报告错误。
我又加了一句
  [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM function

对my.profile,关闭所有窗口,重新打开终端并确保.profile源于启动终端。
但无论我做什么,我都无法使用RVM转换到1.9.3并使用rails。
路径或$HOME/.rvm/scripts/rvm中没有添加到路径:
    $ rvm list
    -sh: rvm: command not found


    $ type rvm | head -1
   -sh: type: rvm: not found

如果我将$HOME/.rvm/bin添加到path,我可以看到rvm jazz,但是
    $ type rvm | head -1
    rvm is hashed (/Users/soychicka/.rvm/bin/rvm)

如果我将$home/.rvm/scripts添加到path,并且
    $ type rvm | head -1
    rvm is /Users/soychicka/.rvm/scripts/rvm

在最后一种情况下,发出“rvm list”不会抛出错误,而只是返回一个新的提示。
同样,似乎所有的东西都被正确编译和安装了;只是不能让RVM到jf Ruby 1.9.3和各种gems投入使用。
这里怎么了?我已经看过所有明显相关的问题,但没有任何东西似乎符合…
这对于我试图让我的团队看到用Rails进行原型设计的容易程度不是一个好兆头。。。
更新:
将以下内容添加到my.profile(而不是.bash_profile)似乎解决了此问题:
    PATH=$HOME/.rvm/bin:$PATH

    if [ -s "$HOME/.rvmrc" ]; then
        source "$HOME/.rvmrc"
    fi # to have $rvm_path defined if set
    if [ -s "${rvm_path-$HOME/.rvm}/scripts/rvm" ]; then
        source "${rvm_path-$HOME/.rvm}/scripts/rvm"
    fi

但对我来说,这感觉有点太老套,不舒服,它仍然不清楚为什么这不同于我的其他狮子装置第一次安装是在2月份,但上个月尝试在系统上设置rvm,但这一次按照相同的指令设置失败有人有主意吗?

最佳答案

man bash

After reading that file, it looks for ~/.bash_profile,
~/.bash_login, and ~/.profile, in that order, and reads and
executes commands from the first one that exists and is readable.

你确定其他文件都不存在吗?
同时执行
source "$HOME/.rvm/scripts/rvm"

在你的壳里,看看它是否按预期工作。
我希望您知道管道curl直接输出到bash的安全含义。

关于ruby - OS X lion rvm,ruby安装成功,但未执行。我想念什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10322486/

10-12 00:09
查看更多