Setup for Windows

This guide is a part of the Rails Girls workshop main guides. Make sure you follow the numbered guides in order before continuing.

To install Rails for Windows we’ll need to install Ruby and several supporting tools such as Git and SQLite. Follow the steps below in order to install these tools on your computer. When you’re done with these steps you will have a Rails app running on your computer.

Make sure you're familiar with the tools you'll need for this guides before continuing.

During these steps we’ll ask you to open and close the Windows Command Prompt every now and then. This can be either the “Command Prompt” or “Powershell” app. We ask you to close and re-open it, because when the Command Prompt starts it loads in the environment. When we install a new app, the environment does not get automatically updated in the Command Prompt. To test if the installation was successful we need to restart the Command Prompt and load the new environment.

If you run into any problems during this guide, check the Possible errors section for solutions.

Install Ruby

We’ll start by installing Ruby, the primary programming language used during the workshop. This can be done using the RubyInstaller described below.

Install Git

You can now install Git, the version management system we’ll be using for this workshop. A version management system gives you a particularly handy superpower: it allows us to travel back and forth in time. Well, at least while working with files on our computer. We’ll show you how to use this during the workshop!

Install SQLite

Next you’ll install the SQLite database on your laptop. This is a system in which you can store data into and fetch data from. It does not have an automatic installer unfortunately, like Ruby and Git, so you’ll need to do a couple of more steps manually.

sqlite3 --version

These were a bunch more steps than you’ll need to perform for these kinds of steps for the rest of the workshop. If you get stuck at any time, ask a coach or any of the organizers of your local workshop for help.

Install Rails

Finally, you’ve arrived at the part where you’ll install Rails, the tool you’ll focus on during the workshop.

Open the Windows Command Prompt run the following command. This will install the Rails and bundler gems on your computer.

gem install rails bundler --no-document

Let’s check whether Rails was installed successfully. Open the Windows Command Prompt and run the following command to check if the installation was successful.

rails --version

This should output Rails 7.0.4.2, but a higher version is also good.

If you run into any problems during this step, check the Possible errors section for possible solutions.

Check the environment

Almost there! We’ve installed a chain of tools: Ruby, Git, SQLite and now finally: Rails. Let’s see if everything works as intended.

To test this, we’ll create a new app. Don’t expect too much, it will just show a single webpage showing the “Rails” logo. During the workshop you’ll turn that page into an actual app. For now, we just need to make sure that you can see that logo. Let’s get started with our final set of Terminal commands!

Check that everything is working by first running the application generator command. This will create a new Rails app which we can test with.

rails new railsgirlsapp

The rails new command creates a new folder on your computer called “railsgirlsapp”, containing all the code for your application. Let’s open that directory in the Terminal using the cd command:

cd railsgirlsapp

Next, you’ll start the Rails server briefly to make sure it starts properly. This is where the magic happens.

rails server

Unlike previous commands, this one will not stop until you press the ctrl + c keys together to stop it. You have just started a web server on your laptop, and it is ready to start taking visitors and show them your sample application. Let’s not keep it waiting.

Go to http://localhost:3000 in your Browser. You should see the Rails logo appear.

If at any point during this guide you ran into a problem and can’t continue. Not a problem! Contact the workshop organizers and let them know about your problem. Some workshops have dedicated set up evenings and otherwise they can help you on the day of the workshop itself.

If you do see a Rails logo in your Browser, you now have a working Ruby on Rails programming setup. Congrats!

You’re ready for the workshop. If you are preparing before the workshop, you don’t have to continue with guides until the day of the workshop. See you then!

Help from the coach

If there’s a coach present, they can help verify the installation by using the scaffold command and inputting data with the generated page with coaches to ensure everything is working. Remove the test app myapp to make super sure no-one is working in the wrong folder, while following the steps of the workshop.


If you’re ever stuck during a guide, please ask your coach for help and also consult this handy cheatsheet for Ruby, Rails, the console, the Text Editor etc.

Guides

View all guides