首页 > 其他 > 详细

debian下安装rvm配置ruby环境

时间:2014-10-10 18:40:25      阅读:229      评论:0      收藏:0      [点我收藏+]

先安装rvm

curl -L https://get.rvm.io | bash -s stable

 

source ~/.rvm/scripts/rvm

 

安装必须的东西

rvm requirements


看看装哪个ruby

rvm list known


2.1.3貌似最新

rvm install ruby-2.1.3



设置默认

rvm use ruby-2.1.3 --default

 


如果看到

RVM is not a function, selecting rubies with rvm use ... will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.

则在.bashrc添加

source ~/.rvm/scripts/rvm

重启bash


安装rubygems,不过理论上应该已经包含在ruby里面了

rvm rubygems current


修改gem的源到淘宝
先看看原来的

gem sources -l


删除

gem sources --remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/



下面直接安装rails

gem install rails -V

 

补充个别人写的换源的工具

gem install chsource

 

用法:

rails new helloWorld --skip-bundle
cd helloWorld
chsource taobao
bundle install

 



debian下安装rvm配置ruby环境

原文:http://www.cnblogs.com/ziyouchutuwenwu/p/4016202.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!