Skip to content

Instantly share code, notes, and snippets.

@niwatako
Last active August 29, 2015 14:07
Show Gist options
  • Save niwatako/c88accd861ec51734f0f to your computer and use it in GitHub Desktop.
Save niwatako/c88accd861ec51734f0f to your computer and use it in GitHub Desktop.
Rubyでgit cloneなり新規作成なりしたプロジェクトをセットアップする手順とそのための環境構築 ref: http://qiita.com/niwatako/items/a85488a6dcd491d41037
# rbenv versions # インストール済みRuby一覧
# rbenv install -l # インストール可能なRuby一覧
# rbenv install 2.0.0-p481 # インストール
rbenv local 2.0.0-p481 # ディレクトリで利用するRubyの指定
bundle install #
# 次のコマンドと同じ挙動とする。「前提」の設定がまだの場合は次のコマンドで
# bundle install --path=vendor/bundle --binstubs=vendor/bin
bundle init
brew install readline ruby-build rbenv
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
. ~/.bash_profile #環境再読み込み
rbenv global system #標準で使うRubyはシステムデフォルトのものに
gem install bundler
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
$ git clone git://github.com/ianheggie/rbenv-binstubs.git ~/.rbenv/plugins/rbenv-binstubs
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
$ 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