Skip to content

Instantly share code, notes, and snippets.

@choyno
Last active May 15, 2020 02:36
Show Gist options
  • Save choyno/6638c692fec0262d2be6ada3436de9bc to your computer and use it in GitHub Desktop.
Save choyno/6638c692fec0262d2be6ada3436de9bc to your computer and use it in GitHub Desktop.
Rails New With Specific Rails Version
# make directory for new rails app
mkdir app
cd app
# specify ruby version
echo 2.6.3 > .ruby-version
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'rails', '~> 6.1.0.alpha', git: 'https://github.com/Shopify/rails'" >> Gemfile
OR gem 'rails', '~> 6.1.0.alpha', git: 'https://github.com/Shopify/rails'
rvm gemset use 2.6.3@appname --create
bundle install
# create rails app using specified version, and overwrite current Gemfile
bundle exec rails new . --force --skip-bundle
bundle exec rails new . --force --skip-bundle --api
Re intall bundler
gem install bundler
sudo gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment