Skip to content

Instantly share code, notes, and snippets.

@tudorpavel
Last active February 11, 2016 15:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tudorpavel/12c072b407370ba8c55a to your computer and use it in GitHub Desktop.
Save tudorpavel/12c072b407370ba8c55a to your computer and use it in GitHub Desktop.
Local setup for Ruby on Rails development on Linux

Ruby on Rails Setup

Install Ruby

Ruby on Rails depends on the Ruby programming language (doh), so we need to install that first. Follow the Ruby Setup guide to install a local version of Ruby.

Install Rails

Install the latest version of Rails

gem install rails

Or install a specific version (4.2.5.1 for example)

gem install rails --version 4.2.5.1

You can check which version was installed

rails -v

JavaScript Runtime

Rails needs a JavaScript runtime to work, we will install the latest version of node.js with nvm. Follow the instructions here to install nvm: https://github.com/creationix/nvm#install-script.

Check which versions of node.js are available

nvm list-remote

Then install the latest version of node.js (5.6.0 for example)

nvm install 5.6.0

Use it

nvm use 5.6.0

And make it the default version

nvm alias default 5.6.0

Next steps

You might want to install PostgreSQL and other stuff, but for trying out and playing around with Ruby on Rails, the above are enough.

Just go to http://guides.rubyonrails.org/getting_started.html and follow along with creating your first Rails app.

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