Mac Ruby Rails installation (using RVM)

Source: Internet
Author: User

Mac occasions:

which ruby -》 / usr / bin / ruby -》 This is the ruby that comes with mac, we hope to use it to manage the ruby version.

Install rvm

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

source ~ / .profile
Check the installation ruby conditions

rvm requirements
 If status 1 is wrong.

ruby -e "$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" reinstall homebrew
If the download and installation speed is very slow, you can use brew install to install the remaining packages

Install ruby, you need to tell the location of rvm openssl

?????????????? rvm install 2.0.0 --with-openssl-dir = $ HOME / .rvm / usr
Generally mac has ruby2.0.0 installed by default

Configure gem so that it does not generate documentation, rdoc and ri

subl ~ / .gemrc
Add to the file
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
 Install rails

If the speed is very slow, you can change it to Taobao's gem

#View the current source gem source list
Delete a source gem source remove http://rubygems.org
#Add source, use domestic rubygems
Faster mirroring gem source add http://ruby.taobao.org/
gem install rails --version 4.0.0 -V
mac ruby rails installation (using rvm)

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.