转 CentOS下面安装RVM+ruby+Rails
使用
- curl -L https://get.rvm.io | bash -s stable
下载并安装rvm稳定版本。不在使用bash < <(curl -s https://rvm.beginrescueend.com/install/rvm),切记。
很快安装完rvm后,重新登录一个新的ssh,使用rvm -v检查一下版本即可。
(2)安装一些以来库,编译安装其它软件或者库的时候会用到
- yum install zlib zlib-devel sqlite-devel
最后的信息大致如下:
- ...... 30 kB/s | 124 kB 00:04
- Running rpm_check_debug
- Running Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Installing : sqlite-devel-3.6.20-1.el6.i686 1/2
- Installing : zlib-devel-1.2.3-27.el6.i686 2/2
- Installed:
- sqlite-devel.i686 0:3.6.20-1.el6 zlib-devel.i686 0:1.2.3-27.el6
- Complete!
(3)强烈推荐安装ruby前,先安装openssl,否则以后要用到ssl的时候可能痛不欲生地要重新安装ruby。
- rvm pkg install openssl
安装完成后,有下面的提示信息,如果安装错误,也有提示告示你到哪里查看日志。
- [root@localhost config]# rvm pkg install openssl
- Fetching openssl-0.9.8t.tar.gz to /usr/local/rvm/archives
- Extracting openssl-0.9.8t.tar.gz to /usr/local/rvm/src
- Configuring openssl in /usr/local/rvm/src/openssl-0.9.8t.
- Compiling openssl in /usr/local/rvm/src/openssl-0.9.8t.
- Installing openssl to /usr/local/rvm/usr
不同的操作系统或者用户,安装位置可能不一样。
(4)指定openssl位置来安装ruby
提示有一些库可能需要安装,请根据实际情况决策是否需要yum install一些以来库。
- yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
可以先安装上面的一些库,再安装ruby
- rvm install 1.9.2 --with-openssl-dir=/usr/local/rvm/usr
我看完提示信息后,q推出提示,没有安装其它依赖库,继续安装ruby。
- ......
- Press 'q' to continue.
- Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 460k 100 460k 0 0 29602 0 0:00:15 0:00:15 --:--:-- 34256
- Extracting yaml-0.1.4.tar.gz to /usr/local/rvm/src
- Configuring yaml in /usr/local/rvm/src/yaml-0.1.4.
- Compiling yaml in /usr/local/rvm/src/yaml-0.1.4.
- Installing yaml to /usr/local/rvm/usr
- Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
- ruby-1.9.2-p320 - #fetching
- ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection...
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 8770k 100 8770k 0 0 44230 0 0:03:23 0:03:23 --:--:-- 55436
- ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /usr/local/rvm/src/ruby-1.9.2-p320
- ruby-1.9.2-p320 - #extracted to /usr/local/rvm/src/ruby-1.9.2-p320
- ruby-1.9.2-p320 - #configuring
- ruby-1.9.2-p320 - #compiling
- ruby-1.9.2-p320 - #installing
- Retrieving rubygems-1.8.24
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 371k 100 371k 0 0 38121 0 0:00:09 0:00:09 --:--:-- 38064
- Extracting rubygems-1.8.24 ...
- Removing old Rubygems files...
- Installing rubygems-1.8.24 for ruby-1.9.2-p320 ...
- Installation of rubygems completed successfully.
- ruby-1.9.2-p320 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
- ruby-1.9.2-p320 - #importing default gemsets (/usr/local/rvm/gemsets/)
- Install of ruby-1.9.2-p320 - #complete
(5) rvm use 1.9.2
(6) gem install rails
- Fetching: i18n-0.6.0.gem (100%)
- Fetching: multi_json-1.3.6.gem (100%)
- Fetching: activesupport-3.2.6.gem (100%)
- Fetching: builder-3.0.0.gem (100%)
- Fetching: activemodel-3.2.6.gem (100%)
- Fetching: rack-1.4.1.gem (100%)
- Fetching: rack-cache-1.2.gem (100%)
- Fetching: rack-test-0.6.1.gem (100%)
- Fetching: journey-1.0.4.gem (100%)
- Fetching: hike-1.2.1.gem (100%)
- Fetching: tilt-1.3.3.gem (100%)
- Fetching: sprockets-2.1.3.gem (100%)
- Fetching: erubis-2.7.0.gem (100%)
- Fetching: actionpack-3.2.6.gem (100%)
- Fetching: arel-3.0.2.gem (100%)
- Fetching: tzinfo-0.3.33.gem (100%)
- Fetching: activerecord-3.2.6.gem (100%)
- Fetching: activeresource-3.2.6.gem (100%)
- Fetching: mime-types-1.19.gem (100%)
- Fetching: polyglot-0.3.3.gem (100%)
- Fetching: treetop-1.4.10.gem (100%)
- Fetching: mail-2.4.4.gem (100%)
- Fetching: actionmailer-3.2.6.gem (100%)
- Fetching: rack-ssl-1.3.2.gem (100%)
- Fetching: thor-0.15.4.gem (100%)
- Fetching: json-1.7.3.gem (100%)
- Building native extensions. This could take a while...
- Fetching: rdoc-3.12.gem (100%)
- ......
至此安装完毕,后面再来验证吧。
转 CentOS下面安装RVM+ruby+Rails的更多相关文章
- RHEL7在线安装rvm(ruby管理包)
ttp://blog.csdn.net/lixwjava/article/details/50408070 安装curl sudo yum install curl 然后在在终端中输入命令 curl ...
- win10 安装mingw ruby rails
原文可以参考 https://ruby-china.org/topics/17581 在window10 安装ruby rails https://rubyinstaller.org/download ...
- centos 7 安装 rvm 超时
关于 rvm 建议没有变成基础的朋友不要选择这种方式安装 不然很有可能到 对ruby很感兴趣想学到放弃的 因为ruby实在是太麻烦 太麻烦 你会遇到各种各样的问题 我之前安装过一次rvm ...
- How to Install Xcode, Homebrew, Git, RVM, Ruby & Rails on Snow Leopard, Lion, Mountain Lion, and Mavericks
After following many outdated and incomplete instructions for setting up a web development environme ...
- CentOS上安装配置Ruby on Rails
0.install sublime editor(optional) ref:http://www.tecmint.com/install-sublime-text-editor-in-linux/ ...
- centos 6.x安装rvm 配置 Ruby开发环境
rvm是ruby的版本管理工具 还可对ruby进行 安装 卸载 等 1.安装 curl # sudo yum install curl # curl -L get.rvm.io | bash ...
- centos 6.5安装rvm 配置 Ruby开发环境
我是用ruby写测试脚本用 安装rvm也是费了好大劲 英文不易看懂 ,是个硬伤! rvm是ruby的版本管理工具 还可对ruby进行 安装 卸载 等 1.安装 curl # sudo yum ...
- mac ruby rails安装(使用rvm)
mac的场合: which ruby -> /usr/bin/ruby -> 这是mac自带的ruby,我们希望能用管理ruby的版本. 安装rvm curl -L https://get ...
- CentOS 7通过RVM来安装指定版本的Ruby
RVM也就是Ruby Version Manager,Ruby版本管理器 1.安装依赖库: yum install gcc-c++ patch readline readline-devel zlib ...
随机推荐
- spring加载jar包中多个配置文件(转载)
本文转载自:http://www.cnblogs.com/GarfieldTom/p/3723915.html
- flask第十五篇——Response
从这一节开始,我就要开始讲关于模板的知识了.先来学习一下Response的相关知识. 所有返回前台的内容其实都应该是Response的对象或者其子类,我们看到如果返回的是字符串直接可以写成return ...
- 给StackPanel的子元素添加padding
<StackPanel> <StackPanel.Resources> <Style TargetType="{x:Type TextBox}"> ...
- UVA11401 Triangle Counting
题意 输入\(n\),输出有多少种方法可以从\(1,2,3,\dots,n\)中选出3个不同的整数,使得以他们为三边长可以组成三角形. \(n \leq 10^6\) 分析 参照刘汝佳的题解. 按最大 ...
- asp搭建网站
测试环境:Windows 2003 下载asp源码导入 C:\Inetpub\wwwroot ###一.通过ip访问 最后浏览 浏览器输入ip或者 http://127.0.0.1 二.通过域名访问 ...
- travis-cli 使用
1. 添加项目 登录 travis 选择对应项目即可 2. 添加持续集成文件 .travis.yml language: node_js node_js: - "node" bef ...
- webpack libray 参考例子
备注: 使用webpack 进行模块导出,方便进行通信 1. 项目初始化 ├── main.js ├── package.json ├── show.js ├── webpack.config.j ...
- filter异常捕捉
jsp中抛出一个异常 <% String action = request.getParameter("action"); if ("accountExceptio ...
- STL容器的resize方法
刚才写DFS程序,为了加个创建DFS树然后再次遍历的功能,把初始化的代码给封装到init()函数里,然后直接调用之后对同样是邻接表表示的DFS树进行DFS. 然后令人诧异的是竟然没有打印结果,调试发现 ...
- php处理字符串格式的计算表达式
有时候我们对每一种产品都有一个提成公式,而这个计算提成的公式是以字符串格式存在表中的 当我们用这个计算公式时,他并不像我们写的:$a=2+3*5;这样简单的能计算出结果,而它是个字符串 所以,我们就必 ...