Last active
August 29, 2015 14:07
-
-
Save niwatako/c88accd861ec51734f0f to your computer and use it in GitHub Desktop.
Rubyでgit cloneなり新規作成なりしたプロジェクトをセットアップする手順とそのための環境構築 ref: http://qiita.com/niwatako/items/a85488a6dcd491d41037
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rbenv versions # インストール済みRuby一覧 | |
# rbenv install -l # インストール可能なRuby一覧 | |
# rbenv install 2.0.0-p481 # インストール | |
rbenv local 2.0.0-p481 # ディレクトリで利用するRubyの指定 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle install # | |
# 次のコマンドと同じ挙動とする。「前提」の設定がまだの場合は次のコマンドで | |
# bundle install --path=vendor/bundle --binstubs=vendor/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install readline ruby-build rbenv | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
. ~/.bash_profile #環境再読み込み | |
rbenv global system #標準で使うRubyはシステムデフォルトのものに |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install bundler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle config --global path 'vendor/bundle' #gemをローカルインストール | |
bundle config --global bin 'vendor/bin' # binを作りbundle execを省略可に | |
#個別に設定したい場合は場合はbundlerをオプション付きで実行。 | |
bundle install --path=vendor/bundle --binstubs=vendor/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone git://github.com/ianheggie/rbenv-binstubs.git ~/.rbenv/plugins/rbenv-binstubs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment