9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu 12.04.4 LTSにrbenvを利用しRubyとRuby on Railsをインストール

Last updated at Posted at 2014-04-04


$ sudo apt-get install git

$ sudo apt-get install build-essential

$ sudo apt-get install libssl-dev

$ sudo apt-get install libsqlite3-dev

$ sudo apt-get install nodejs

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

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

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

シェルを再起動


$ type rbenv

ruby-buildをインストール


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

Rubyインストール


$ rbenv install -l

$ rbenv install 2.1.2

※数値だけの行の最大の値が最新なのでそれを入れる

$ rbenv rehash

$ rbenv global 2.1.2
※インストールしたバージョンを指定

$ gem i bundler


Railsインストール


$ gem i rails
$ gem i spring

postgresqlインストール


$ sudo apt-get install postgresql

※DBはインストール後に起動している。postgresqlを停止する場合
$ sudo service postgresql stop


9
9
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
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?