Created
July 24, 2014 09:21
-
-
Save Darkside73/05560a085522f0cfbe15 to your computer and use it in GitHub Desktop.
Create rails application with rvm gemset
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
#! /bin/sh | |
source "$HOME/.rvm/scripts/rvm" | |
app_name=$1 | |
rvm default | |
current_ruby=`rvm current` | |
echo "Creating gemset ${app_name}..." | |
rvm gemset create $app_name | |
gemset="${current_ruby}@${app_name}" | |
echo "Installing rails gem..." | |
rvm $gemset do gem install rails | |
echo "Creating rails application ${app_name}..." | |
rvm $gemset do rails new $@ | |
echo "Write rvm dot files..." | |
cd $app_name && echo $current_ruby > .ruby-version && echo $app_name > .ruby-gemset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment