Go to CentOS and install Rvm+ruby+rails

Source: Internet
Author: User
Tags install openssl

CentOS6.2 Install Rvm+ruby+rails (1) RVM The official website should be revised once,
Using Java code
    1. Curl-l https://get.rvm.io | bash-s stable
Download and install the RVM stable version. Not using Bash < < (Curl-s HTTPS://RVM.BEGINRESCUEEND.COM/INSTALL/RVM), remember.
Soon after installing RVM, re-login to a new SSH, using RVM-V to check the version.

(2) Install some libraries, compile and install other software or libraries will be used when
Java code
    1. Yum Install zlib zlib-devel sqlite-devel

The final message is roughly as follows:
Java code
  1. ...... kb/s | 124 KB xx:
  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) It is strongly recommended that you install OpenSSL before installing Ruby, or you may have to reinstall Ruby if you want to use SSL later.
Java code
    1. RVM Pkg Install OpenSSL

After the installation is complete, there is the following information, if the installation error, there is also a prompt notice you where to view the log.
Java code
    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

Different operating systems or users, the installation location may not be the same.


(4) Specify the OpenSSL location to install Ruby
Tip There are some libraries that may need to be installed, so make a decision as to whether you need yum to install some libraries since.
Java code
    1. Yum install-y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 A utoconf automake Libtool Bison iconv-devel

You can install some of the above libraries before you install Ruby
Java code
    1. RVM install 1.9. 2--with-openssl-dir=/usr/local/rvm/usr

After I read the message, Q introduced a hint that no other dependent libraries were installed and continued to install Ruby.
Java code
  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 current
  5. Dload Upload Total spent
  6. 460k 460k 0 0 29602 0 0:xx: 0:xx:--:--:-- 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 could take a while the 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 is a while depending on your connection ...
  14. % total% Received% xferd Average speed Time Time current
  15. Dload Upload Total spent
  16. 8770k 8770k 0 0 44230 0 0: from: 0::--:--:-- 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. -
  23. % total% Received% xferd Average speed Time Time current
  24. Dload Upload Total spent
  25. 371k 371k 0 0 38121 0 0:xx: 0:xx:--:--:-- 38064
  26. Extracting rubygems-1.8. ...
  27. Removing old Rubygems files ...
  28. Installing rubygems-1.8. 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
Java code
  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. ......

Now that the installation is complete, verify it later.

Go to CentOS and install Rvm+ruby+rails

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.