Created
January 14, 2011 15:49
-
-
Save ilpeste/779765 to your computer and use it in GitHub Desktop.
RVM and Rails 3 install
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
# Download and install RVM | |
bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-head) | |
mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 http://github.com/wayneeseguin/rvm.git && cd rvm && ./install | |
#Install the rubies with readline patch | |
rvm package install readline | |
rvm package install openssl | |
rvm package install iconv | |
rvm install 1.9.2 --with-readline-dir=$HOME/.rvm/usr --with-iconv-dir=$HOME/.rvm/usr --with-openssl-dir=$HOME/.rvm/usr | |
# Set the default ruby version | |
rvm --default 1.9.2 | |
# Add to .bashrc the following lines: | |
# at the top of the file... | |
if [ -z "$PS1" ]; then | |
# at the bottom of the file... | |
fi | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. | |
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion | |
PS1="\$(~/.rvm/bin/rvm-prompt v g s)> $PS1" | |
# Create a gemset for an application | |
rvm use 1.9.2 | |
rvm gemset create 'ApplicationName' | |
rvm use 1.9.2@ApplicationName | |
# To create a new Rails 3 application | |
gem install rails | |
rails new applicationname | |
# Inside the Rails 3 application, do this to trust the gems and rubies | |
echo "rvm 1.9.2@ApplicationName" > .rvmrc | |
# Install bundler which will install all the gems in Gemfile | |
gem install bundler | |
bundle install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment