Skip to content

Instantly share code, notes, and snippets.

@whalesalad
Created June 13, 2013 08:01
Show Gist options
  • Select an option

  • Save whalesalad/5771984 to your computer and use it in GitHub Desktop.

Select an option

Save whalesalad/5771984 to your computer and use it in GitHub Desktop.
Installing Ruby + Rails

rbenv

From your home directory

git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

Crack open your ~/.bash_profile and modify your $PATH. Below is an example:

export PATH="$HOME/.rbenv/bin:$PATH"

While editing your ~/.bash_profile, also add the line to initialize rbenv:

eval "$(rbenv init -)"

Save and close your profile, then reload your shell:

 exec $SHELL -l

ruby-install

Then you'll want to get ruby-install added as a rbenv plugin:

git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Install Ruby

Now it's time to install Ruby. This takes a while as it's done from source:

rbenv install 2.0.0p195

Once this is done, set this new installation to the global Ruby:

rbenv global 2.0.0p195

Configure Rubygems

Now that Ruby is installed, we'll tell Rubygems to not install documentation. Save the following as your ~/.gemrc:

install: --no-rdoc --no-ri
update:  --no-rdoc --no-ri

Install Bundler and Rails

gem install bundler
gem install rails

Now create a new Rails project

The following guide gives a real straightforward introduction to creating a new Rails app:

http://guides.rubyonrails.org/getting_started.html#creating-the-blog-application

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