Last active
December 15, 2016 11:04
-
-
Save ahbou/a6aa66fc8d35e4e6514eca356599e606 to your computer and use it in GitHub Desktop.
Managing multiple Rails version with Bundler and rbenv
This file contains hidden or 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
# make sure homebrew is up to date | |
brew update | |
# update ruby version | |
brew upgrade ruby-build | |
# install latest stable version | |
rbenv install 2.3.3 | |
#set version as global | |
rbenv global 2.3.3 | |
#install bundler for that ruby version | |
gem install bundler | |
# create directory | |
mkdir my-rails-app | |
# get the latest rails version | |
gem search rails | grep "^rails " | |
#add gemfile targetting latest version | |
echo "source 'https://rubygems.org'" > Gemfile | |
echo "gem 'rails', '5.0.0.1'" >> Gemfile | |
#intall Rails version | |
bundle install | |
#check that it was installed | |
bundle exec rails -v | |
#create the Rails app (overwrite gemfile) | |
bundle exec rails new . --force --skip-bundle | |
bundle update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment