ubuntu ror安装

来源:互联网 发布:android 监听网络状态 编辑:程序博客网 时间:2024/06/06 17:19

安装 RVM 和 Ruby

更新 apt,并安装 curl:

$ sudo apt-get update$ sudo apt-get install curl

然后安装 RVM:

$ \curl -sSL https://get.rvm.io | bash

步骤1 - 安装 RVM

RVM 是干什么的这里就不解释了,后面你将会慢慢搞明白。

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

期间可能会问你sudo管理员密码,以及自动通过homebrew安装依赖包,等待一段时间后就可以成功安装好 RVM。

然后,载入 RVM 环境(新开 Termal 就不用这么做了,会自动重新载入的)

$ source ~/.rvm/scripts/rvm

检查一下是否安装正确

$ rvm -vrvm 1.22.17 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

步骤2 - 用 RVM 安装 Ruby 环境

$ rvm install 2.0.0

同样继续等待漫长的下载,编译过程,完成以后,Ruby, Ruby Gems 就安装好了。

步骤3 - 设置 Ruby 版本

RVM 装好以后,需要执行下面的命令将指定版本的 Ruby 设置为系统默认版本

$ rvm 2.0.0 --default

同样,也可以用其他版本号,前提是你有用 rvm install 安装过那个版本

这个时候你可以测试是否正确

$ ruby -vruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]$ gem -v2.1.6$ gem source -r https://rubygems.org/$ gem source -a https://ruby.taobao.org

步骤4 - 安装 Rails 环境

上面 3 个步骤过后,Ruby 环境就安装好了,接下来安装 Rails

$ gem install rails

然后测试安装是否正确

$ rails -vRails 3.2.13

然后开始你的 Ruby,Rails 之旅吧。
欢迎来到 Ruby 的世界!



3down vote

actually after installation of rvm , you have to run the script. i was stuck in the same level as you are, than in terminal i read this line:

" To start using RVM you need to run source /usr/local/rvm/scripts/rvm " 
so place this command (source /usr/local/rvm/scripts/rvm) in terminal and enter

and after that :

type rvm | head -1rvm is a function (this you will see hopefully)



3down vote

actually after installation of rvm , you have to run the script. i was stuck in the same level as you are, than in terminal i read this line:

" To start using RVM you need to run source /usr/local/rvm/scripts/rvm " 
so place this command (source /usr/local/rvm/scripts/rvm) in terminal and enter

and after that :

type rvm | head -1rvm is a function (this you will see hopefully)
http://blog.csdn.net/cschengvdn/article/details/42461877

https://ihower.tw/rails4/firststep.html


如果重启等再遇到  No command 'rvm' found, but there are 20 similar ones
source /usr/local/rvm/scripts/rvm

type rvm | head -1rvm is a function (this you will see hopefully)
source /usr/local/rvm/scripts/rvm

rvm 2.0.0 --default
http://www.tuicool.com/articles/IjA32u

0 0
原创粉丝点击