(1)RVM官方网站应该是改版过一次,
使用

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

下载并安装rvm稳定版本。不在使用bash < <(curl -s https://rvm.beginrescueend.com/install/rvm),切记。

很快安装完rvm后,重新登录一个新的ssh,使用rvm -v检查一下版本即可。

(2)安装一些以来库,编译安装其它软件或者库的时候会用到

  1. yum install zlib zlib-devel sqlite-devel

最后的信息大致如下:

  1. ......                                                                                                        30 kB/s | 124 kB     00:04
  2. Running rpm_check_debug
  3. Running Transaction Test
  4. Transaction Test Succeeded
  5. Running Transaction
  6. Installing : sqlite-devel-3.6.20-1.el6.i686                                                                                            1/2
  7. Installing : zlib-devel-1.2.3-27.el6.i686                                                                                              2/2
  8. Installed:
  9. sqlite-devel.i686 0:3.6.20-1.el6                                       zlib-devel.i686 0:1.2.3-27.el6
  10. Complete!

(3)强烈推荐安装ruby前,先安装openssl,否则以后要用到ssl的时候可能痛不欲生地要重新安装ruby。

  1. rvm pkg install openssl

安装完成后,有下面的提示信息,如果安装错误,也有提示告示你到哪里查看日志。

  1. [root@localhost config]# rvm pkg install openssl
  2. Fetching openssl-0.9.8t.tar.gz to /usr/local/rvm/archives
  3. Extracting openssl-0.9.8t.tar.gz to /usr/local/rvm/src
  4. Configuring openssl in /usr/local/rvm/src/openssl-0.9.8t.
  5. Compiling openssl in /usr/local/rvm/src/openssl-0.9.8t.
  6. Installing openssl to /usr/local/rvm/usr

不同的操作系统或者用户,安装位置可能不一样。

(4)指定openssl位置来安装ruby

提示有一些库可能需要安装,请根据实际情况决策是否需要yum install一些以来库。

  1. 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

  1. rvm install 1.9.2 --with-openssl-dir=/usr/local/rvm/usr

我看完提示信息后,q推出提示,没有安装其它依赖库,继续安装ruby。

  1. ......
  2. Press 'q' to continue.
  3. Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
  4. % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  5. Dload  Upload   Total   Spent    Left  Speed
  6. 100  460k  100  460k    0     0  29602      0  0:00:15  0:00:15 --:--:-- 34256
  7. Extracting yaml-0.1.4.tar.gz to /usr/local/rvm/src
  8. Configuring yaml in /usr/local/rvm/src/yaml-0.1.4.
  9. Compiling yaml in /usr/local/rvm/src/yaml-0.1.4.
  10. Installing yaml to /usr/local/rvm/usr
  11. Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
  12. ruby-1.9.2-p320 - #fetching
  13. ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection...
  14. % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  15. Dload  Upload   Total   Spent    Left  Speed
  16. 100 8770k  100 8770k    0     0  44230      0  0:03:23  0:03:23 --:--:-- 55436
  17. ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /usr/local/rvm/src/ruby-1.9.2-p320
  18. ruby-1.9.2-p320 - #extracted to /usr/local/rvm/src/ruby-1.9.2-p320
  19. ruby-1.9.2-p320 - #configuring
  20. ruby-1.9.2-p320 - #compiling
  21. ruby-1.9.2-p320 - #installing
  22. Retrieving rubygems-1.8.24
  23. % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  24. Dload  Upload   Total   Spent    Left  Speed
  25. 100  371k  100  371k    0     0  38121      0  0:00:09  0:00:09 --:--:-- 38064
  26. Extracting rubygems-1.8.24 ...
  27. Removing old Rubygems files...
  28. Installing rubygems-1.8.24 for ruby-1.9.2-p320 ...
  29. Installation of rubygems completed successfully.
  30. ruby-1.9.2-p320 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
  31. ruby-1.9.2-p320 - #importing default gemsets (/usr/local/rvm/gemsets/)
  32. Install of ruby-1.9.2-p320 - #complete

(5) rvm use 1.9.2

(6) gem install rails

  1. Fetching: i18n-0.6.0.gem (100%)
  2. Fetching: multi_json-1.3.6.gem (100%)
  3. Fetching: activesupport-3.2.6.gem (100%)
  4. Fetching: builder-3.0.0.gem (100%)
  5. Fetching: activemodel-3.2.6.gem (100%)
  6. Fetching: rack-1.4.1.gem (100%)
  7. Fetching: rack-cache-1.2.gem (100%)
  8. Fetching: rack-test-0.6.1.gem (100%)
  9. Fetching: journey-1.0.4.gem (100%)
  10. Fetching: hike-1.2.1.gem (100%)
  11. Fetching: tilt-1.3.3.gem (100%)
  12. Fetching: sprockets-2.1.3.gem (100%)
  13. Fetching: erubis-2.7.0.gem (100%)
  14. Fetching: actionpack-3.2.6.gem (100%)
  15. Fetching: arel-3.0.2.gem (100%)
  16. Fetching: tzinfo-0.3.33.gem (100%)
  17. Fetching: activerecord-3.2.6.gem (100%)
  18. Fetching: activeresource-3.2.6.gem (100%)
  19. Fetching: mime-types-1.19.gem (100%)
  20. Fetching: polyglot-0.3.3.gem (100%)
  21. Fetching: treetop-1.4.10.gem (100%)
  22. Fetching: mail-2.4.4.gem (100%)
  23. Fetching: actionmailer-3.2.6.gem (100%)
  24. Fetching: rack-ssl-1.3.2.gem (100%)
  25. Fetching: thor-0.15.4.gem (100%)
  26. Fetching: json-1.7.3.gem (100%)
  27. Building native extensions.  This could take a while...
  28. Fetching: rdoc-3.12.gem (100%)
  29. ......

至此安装完毕,后面再来验证吧。

转 CentOS下面安装RVM+ruby+Rails的更多相关文章

  1. RHEL7在线安装rvm(ruby管理包)

    ttp://blog.csdn.net/lixwjava/article/details/50408070 安装curl sudo yum install curl 然后在在终端中输入命令 curl  ...

  2. win10 安装mingw ruby rails

    原文可以参考 https://ruby-china.org/topics/17581 在window10 安装ruby rails https://rubyinstaller.org/download ...

  3. centos 7 安装 rvm 超时

    关于 rvm  建议没有变成基础的朋友不要选择这种方式安装   不然很有可能到 对ruby很感兴趣想学到放弃的 因为ruby实在是太麻烦 太麻烦  你会遇到各种各样的问题   我之前安装过一次rvm ...

  4. 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 ...

  5. CentOS上安装配置Ruby on Rails

    0.install sublime editor(optional) ref:http://www.tecmint.com/install-sublime-text-editor-in-linux/ ...

  6. centos 6.x安装rvm 配置 Ruby开发环境

    rvm是ruby的版本管理工具  还可对ruby进行 安装 卸载 等 1.安装 curl #  sudo yum install  curl #  curl -L  get.rvm.io | bash ...

  7. centos 6.5安装rvm 配置 Ruby开发环境

    我是用ruby写测试脚本用  安装rvm也是费了好大劲  英文不易看懂 ,是个硬伤! rvm是ruby的版本管理工具  还可对ruby进行 安装 卸载 等 1.安装 curl #  sudo yum ...

  8. mac ruby rails安装(使用rvm)

    mac的场合: which ruby -> /usr/bin/ruby -> 这是mac自带的ruby,我们希望能用管理ruby的版本. 安装rvm curl -L https://get ...

  9. CentOS 7通过RVM来安装指定版本的Ruby

    RVM也就是Ruby Version Manager,Ruby版本管理器 1.安装依赖库: yum install gcc-c++ patch readline readline-devel zlib ...

随机推荐

  1. 使用pjax时点击浏览器刷新按钮仅加载内容页的解决办法

    pjax可以实现ajax的局部刷新功能,同时能改变地址栏的URL,因此支持浏览器的后退和前进功能. 但是,在使用中,若没有正确使用,仍然会出现一些问题. 比如,我们在使用pjax后,能够在不加载整个页 ...

  2. BZOJ2565 最长双回文串 【Manacher】

    BZOJ2565 最长双回文串 Description 顺序和逆序读起来完全一样的串叫做回文串.比如acbca是回文串,而abc不是(abc的顺序为"abc",逆序为"c ...

  3. tableau-基本函数

    一.数据术语 维度——包含诸如文本和日期等类别数据的字段. 度量——包含可以聚合的数字的字段. 二.字段图标 Abc  蓝色图标->离散字段 #     绿色图标->连续字段 =Abc = ...

  4. Python 实现汉诺塔问题(递归)

    有三根柱子一次为A,B,C 现在A柱子上有3个块,按照汉诺塔规则移动到C柱子上去,打印步骤? 我们这样理解:A为原始柱,C为目标柱,B为缓冲柱 1.定义一个函数move(n,a,b,c),n为原始柱上 ...

  5. LeetCode 760. Find Anagram Mappings

    原题链接在这里:https://leetcode.com/problems/find-anagram-mappings/description/ 题目: Given two lists Aand B, ...

  6. Bootstrap树控件(Tree控件组件)使用经验分享

    前言:很多时候我们在项目中需要用到树,有些树仅仅是展示层级关系,有些树是为了展示和编辑层级关系,还有些树是为了选中项然后其他地方调用选中项.不管怎么样,树控件都是很多项目里面不可或缺的组件之一.今天, ...

  7. web 前端 html

    1,什么是web 在网络中,大量的数据需要有一个载体,而很多人都能够访问这个载体,利用浏览器的这个窗口链接一个有一个载体,这个载体就是网站也就是web的前身. 1,web标准:结构标准,表现标准,行为 ...

  8. python一些内建函数(map,zip,filter,reduce,yield等)

    python一些内建函数(map,zip,filter,reduce,yield等) map函数 Python实际上提供了一个内置的工具,map函数.这个函数的主要功能是对一个序列对象中的每一个元素应 ...

  9. ecmall挂件开发实例二(转)

    下述例子讲述了快速增加挂件的方法,但对系统中的代码未做更改,基本参照image_ad挂件的方法. 第 一步: 了解首页模板结构 首页文 件结构 include hearder.html 包含的头文件, ...

  10. poj 1637 Sightseeing tour——最大流+欧拉回路

    题目:http://poj.org/problem?id=1637 先给无向边随便定向,如果一个点的入度大于出度,就从源点向它连 ( 入度 - 出度 / 2 ) 容量的边,意为需要流出去这么多:流出去 ...