LoginSignup
0
1

More than 5 years have passed since last update.

macでrails4の環境構築

Last updated at Posted at 2015-07-26

■環境設定

・xcodeのコマンドラインツールが入っていない人はインストール(以下のコマンドでプロンプトが出るため、指示に従ってインストール)

$ xcode-select --install

・Homebrew(ターミナルから簡単にインストールするためのツール)のインストール(以下のコマンドは1行)

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

・Git のインストール

$ brew install git

・rbenvとruby-buildのインストール

$ brew install rbenv ruby-build

・パスの設定

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile  
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile  
$ exec $SHELL -l  

・rubyのインストール

$ rbenv install 2.0.0-p481

・Homeディレクトリに移動

$ cd

・railsプロジェクトを作成

$ mkdir rails_projects

・railsプロジェクトに移動

$ cd rails_projects

・rubyのローカルバージョン設定

$ rbenv local 2.0.0-p481

・rubyのバージョン確認

$ ruby -v

・railsのインストール

$ gem install rails --no-ri --no-doc  
$ rbenv rehash

・アプリケーションの作成

$ rails new アプリ名
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1