LoginSignup
6
5

More than 5 years have passed since last update.

Ubuntu14.04LTSにRuby on Railsをインストール

Last updated at Posted at 2015-05-27

1.gitのインストール

$ sudo apt-get install git
$ git --version

2.rbenvのインストール

~/.rbenvにcloneする

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

パスを通す

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile

rbenv initコマンドを呼び出す

$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

確認する

$ exec $SHELL -l
$ rbenv --version

3.ruby-buildのインストール

$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

4.rubyのインストール

$ rbenv install --list
Available versions:
  1.8.6-p383
  1.8.6-p420
  1.8.7-p249
    …

$ rbenv install -v 2.2.2

確認する

$ rbenv rehash
$ rbenv versions
$ rbenv global 2.2.2
$ ruby -v

5.Ruby on Railsのインストール

$ gem install rails --version 4.0.5

6.その他諸々のインストール

SQLite3のインストール

$ sudo apt-get install -y sqlite3

で、

$ rails new sample

などとやってみて、足りない!と言われたものを順次インストールし、
ちゃんと新規作成されたらオッケー

お世話になりました

6
5
2

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
6
5