新手问题 [已解决] 安装 ruby 的诡异问题,话说我不算新手了啊....

mayday · 2013年03月03日 · 最后由 idarfan 回复于 2013年05月01日 · 2796 次阅读

重装了系统,然后重新配置环境: 我先安装了 rvm,然后rvm install 1.9.3, 接着输入ruby -vwhich ruby都说我没安装 ruby, 然后运行rvm list,显示是rvm rubies: ruby-1.9.3-p385 [ i686 ]。 话说这是什么情况,在线等解答~~~

是不是要运行那句 source,看 wiki

rvm use 1.9.3 --default

source 问题

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
logout

#2 楼 @fresh_fish 我晕,话说我上午安装 2.0.0 时貌似也没运行这句...谢了

sudo apt-get update sudo apt-get upgrade sudo apt-get install curl git-core mysql-server libmysqlclient-dev nodejs curl -L get.rvm.io | bash -s stable source ~/.profile source ~/.rvm/scripts/rvm rvm autolibs enable rvm requirements rvm install 1.9.3 rvm use 1.9.3 --default gem install rdoc gem install rails

編輯 ~/.bashrc 檔案。再把底下橘字的那一行,貼到 ~/.bashrc 的最後一行

sudo gedit ~/.bashrc

and add the following line to the end (and save the file) [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session as a function Then reload the shell session using the command -

source ~/.bashrc

Now you can test whether the RVM has been installed successfully or not. Open terminal and execute the command -

type rvm | head -1

需要 登录 后方可回复, 如果你还没有账号请 注册新账号