Skip to content

Instantly share code, notes, and snippets.

@nosolopau
Last active August 29, 2015 14:14
Show Gist options
  • Save nosolopau/df836caf43bbaa6a0512 to your computer and use it in GitHub Desktop.
Save nosolopau/df836caf43bbaa6a0512 to your computer and use it in GitHub Desktop.
Create a rails application into current directory with specific rbenv and rails version
#!/bin/bash
# Rails new utility
# Usage: rails_new ruby_version rails_version
echo "$1" > .ruby-version
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'rails', '$2'" >> Gemfile
bundle install
bundle exec rails new . --force --skip-bundle --skip-active-record
bundle update
@nosolopau
Copy link
Author

Run with (copy the whole line):

bash <(curl -s https://gist.githubusercontent.com/nosolopau/df836caf43bbaa6a0512/raw/rails_new) 1.9.3-p547 4.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment