How to setup Windows to begin developing Ruby on Rails Web Applications

In this tutorial I'll go all the way from a vanilla OS install to downloading specific software we recommend such as PostgreSQL, Redis, and Git Bash.

[Author's note: I wrote the first couple dozen tutorials in this series a few years ago and I'm in the process of updating the content to reflect the evolution of best practices in the industry. Please let me know if you see anything I missed that should be updated. Thanks!]

Before you begin, I would highly recommend you NOT do the below tutorial and instead dual boot into Ubuntu and follow this tutorial to get things setup.

If you'd rather ignore this warning, then assuming you have a fresh version of Windows (i.e. this should work on 8 and above), here's the steps I'd recommend you take:

(1) Download and install Chrome

(2) Download and install Git, the “Full installer for official Git for Windows x.x.x”, where x.x.x is the highest version available you see.

(3) Download the “Development Kit” here and extract the files to c:/DevKit, then on that same page download and install the latest Ruby 2.x.x version (the “RubyInstallers” section on the top of the page). It's important to install the Dev Kit first.

(4) Download and install RubyGems

(5) Download and install Node.js (run the msi installer)

(6) Download and install PostgreSQL (9.x.x+ for your applicable version of Windows, 64-bit) and select the default options as you go through the installation process (and say yes to install StackBuilder at the end, but you don't need to install anything with it now so you can close it).

(7) Download and install the redis binaries for your version of Windows.

(8) Go grab Firefox, Opera, and Safari as well for testing.

(9) Use Sublime as your code editor.

(10) Open up your “Git Bash” program (Start > All Programs > Git > Git Bash) and enter

git config -global user.name “FIRST_NAME LAST_NAME” 

and then

git config -global user.email “MY_NAME@example.com”

…filling in your name and email.

(11) In Git Bash, enter vi ~/.bash_profile then press i to get into insert mode then paste in this line in the file:

…which sets up your PATH variable correctly. Then press escape, then :wq then enter to save (congrats, you just learned a bit about the unix vi editor).

(12) Open a new Git Bash terminal and then generate a ssh public key by entering ssh-keygen and following all the defaults (do not enter a password, just press enter through it). You can then enter cat ~/.ssh/id_rsa.pub to list your public key, which you'll need to use to gain access to remote code repositories.

(13) Use the pgAdmin III tool to create a user (open up the tool, right-click and connect to your 9.2 server, right-click and create a user — login role — make sure to select the options to allow it to be a superuser and create databases, and make sure to set a password or else you will have problems connecting to it later).

That's it! You are now ready to clone in a git repository of Rails code (or start your own). Make sure your database.yml file has the user & password for your development and test databases match what you created in your pgAdmin tool.

— —

Continue to the next post in this series: HTML Intro


Share this article

LinkedIn Reddit

Startup Rocket

We help entrepreneurs ideate, validate, create, grow, and fund new ventures.

Based on decades of startup experience, our team has developed a comprehensive operations framework, a collaborative online tool, and a personalized coaching experience to help take your business to the next level.

We'll email you as soon as more spots become available in our private beta.