LoginSignup
1
1

More than 5 years have passed since last update.

How to install rails on Mavericks with rvm

Last updated at Posted at 2013-12-02
  • Xcode をインストールします。

名称未設定 2.png

  • Xcode の Command Line Tools をインストールします。
$ xcode-select --install

名称未設定 2.png

  • Homebrew をインストールし、新しいバージョンの bash をインストールします(rvm のインストールに必要です)。
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
$ brew doctor
$ brew install bash
  • /usr/local/binPATH の先頭にします。
$ cat > .bash_profile
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

ターミナルを再起動します。必要なら chsh してください。

  • ドキュメントを作成しないよう設定します。
$ cat > .gemrc
gem: --no-document
gem: --no-ri --no-rdoc
  • rvm をインストールします。
% curl -L get.rvm.io | bash -s stable

* WARNING: Above files contains `PATH=' with no `$PATH' inside, this can break RVM, という警告が出ますが、無視していいです。ターミナルを再起動してください。

  • 対応する ruby 一覧を見るには次のコマンドを使います。
$ rvm list known
  • ruby をインストールします。
$ rvm install 2.0.0-p353
  • gem をアップデートし、rails をインストールします。
$ gem update --system
$ gem update
$ gem install rails -V
  • テスト用にアプリを作ります。
$ rails new rtest
$ cd rtest
$ rails server
1
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
1
1