infoMore than 5 years have passed since last update.
rbenv + Ruby + Ruby On Railsのインストール方法
Last updated at Posted at 2015-02-12
rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~./bash_profile
rbenv -v (確認)
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rubyのインストール
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-buil
cd ~/.rbenv/plugins/ruby-build
git pull
rbenv install "インストールしたいversion"
(ex. rbenv install 2.2.0)
rbenv global "切り替えたいバージョン"
(ex. rbenv global 2.2.0)
rbenv versions (確認)
Ruby on railsのインストール
- bundlerのインストール
- ruby1.9以降はgemが初期装備
- ruby1.9より前の場合はこちらからインストール
gem install bundler
bundle -v
その他
bundle execをしなくても良くなる方法
注意点
- rbenvとrvmは同時にインストール出来ないので、rvmが入っている場合はアンインストールをすること
参考
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
What you can do with signing up