markdown Ruby on Rails的安装环境(Mac OS X 10.9或更高版本)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Ruby on Rails的安装环境(Mac OS X 10.9或更高版本)相关的知识,希望对你有一定的参考价值。

## 1. Install Command line tools on terminal
`xcode-select --install`

## 2. Install Homebrew
`ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`

## 3. Install rbenv
`brew update`  
`brew install rbenv`  
`echo 'eval "$(rbenv init -)"' >> ~/.bash_profile`  
`source ~/.bash_profile`

## 4. Build Ruby with rbenv
#### You can find the newest version of Ruby with the command `rbenv install -l`
`rbenv install 2.4.2`

## 5. Set default Ruby
`rbenv global 2.4.2`

## 6. Install rails
`gem install rails --no-document`

## 7. Check the environment
`rails new myapp`  
`cd myapp`  
`rails server`  

## 8. Go to http://localhost:3000 in your browser, and you should see the ‘Yay! You’re on Rails!’ page.

以上是关于markdown Ruby on Rails的安装环境(Mac OS X 10.9或更高版本)的主要内容,如果未能解决你的问题,请参考以下文章

markdown Ruby on Rails Cheatsheet

markdown Ruby on Rails Cheatsheet

markdown Instalar Ruby,Ruby on Rails和PostgreSQL(Mac y Debian / Ubuntu)

markdown Módulo1 - Conceitosbásicos做Ruby on Rails

markdown Módulo3 - Aprofundando-se没有Ruby on Rails

ruby on rails如何安装