Setup recipe for Rails Girls

Cooking time: 5min active / 15-30min passive

To build apps and other things with Ruby on Rails, we need to setup some software and the developer environment for your computer.

Follow the instructions for your operating system. If you run into any problems, don’t panic. Inform us at the event and we can solve it together.


Setup for OS X

1. Let’s check the version of the operating system.

Click the Apple menu and choose About this Mac.

Apple menu

2. In the window you will find the version of your operating system.

If your version number starts with 10.6, 10.7, 10.8 or 10.9 this guide is for you. If it’s something else, we can setup your machine at the event.

About this Mac dialog

3a. If your OS X version is 10.6, 10.7, or 10.8:

Download the RailsInstaller for your version of OS X:

Double click the downloaded file and it will unpack it into the current directory. Double click the the newly unpacked ‘RailsInstaller-1.0.3-osx-10.7.app’ or ‘RailsInstaller-1.0.3-osx-10.6.app’ and follow the instructions. It will open a README file with ‘Rails Installer OS X’ at the top. Please ignore the instructions in this file.

If the Rails version wasn’t the latest, you could update it using a following command on terminal.

gem update rails --no-ri --no-rdoc

Make sure that all works well by running the application generator command.

rails new railsgirls

3b. If your OS X version is 10.9:

If your version number starts with 10.9, follow these steps. We are installing homebrew and rbenv.

3b1. Install Command line tools on terminal:

xcode-select --install

3b2. Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

3b3. Install rbenv:

brew update
brew install rbenv rbenv-gem-rehash ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

3b4. Build Ruby with rbenv:

You can find the newest version of Ruby with the command “rbenv install -l”.

rbenv install 2.1.2

If you got “OpenSSL::SSL::SSLError: … : certificate verify failed” error, try it this way.

brew install curl-ca-bundle
cp /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt `ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'`

3b5. Set default Ruby:

rbenv global 2.1.2

3b6. Install rails:

gem i rails --no-ri --no-rdoc

4. Install a text editor to edit code files

For the workshop we recommend the text editor Sublime Text.

5. Update your browser

Open whatbrowser.org and update your browser if you don’t have the latest version.

Now you should have a working Ruby on Rails programming setup. Congrats!


Setup for Windows

1. Install Rails

Download RailsInstaller and run it. Click through the installer using the default options.

Open Command Prompt with Ruby on Rails and run the following command:

rails -v

If the Rails version is less than 4, update it using a following command:

gem update rails --no-ri --no-rdoc

Make sure that all works well by running the application generator command.

rails new railsgirls
cd railsgirls
rails server

2. Install a text editor to edit code files

For the workshop we recommend the text editor Sublime Text.

Now you should have a working Ruby on Rails programming setup. Congrats!

3. Update your browser

If you use Internet Explorer, we recommend installing Firefox or Google Chrome.

Open whatbrowser.org and update your browser if you don’t have the latest version.


Setup for Linux

1. Install Rails

To install the Ruby on Rails development environment you just need to copy the line below for your Linux distribution (Ubuntu or Fedora), paste it in the Terminal and press Enter. Enjoy the text flying on the screen; it will take quite some time. Grabbing a refreshing drink before starting is encouraged.

For Ubuntu:

bash < <(curl -sL https://raw.github.com/railsgirls/installation-scripts/master/rails-install-ubuntu.sh)

If you are going to use RVM installations with gnome-terminal, you’ll probably need to change it’s default options before you can see and use the right Ruby and Rails versions. Find out how: RVM documentation.

For Fedora:

bash < <(curl -sL https://raw.github.com/railsgirls/installation-scripts/master/rails-install-fedora.sh)

Make sure that all works well by running the application generator command.

Make sure that all works well by running the application generator command.

rails new railsgirls
cd railsgirls
rails server

2. Install a text editor to edit code files

For the workshop we recommend the text editor Sublime Text.

3. Update your browser

Open whatbrowser.org and update your browser if you don’t have the latest version.

Now you should have a working Ruby on Rails programming setup. Congrats!


Virtual Machine

Instead of installing all tools on your machine, you can also set up a development environment in a Virtual Machine. Please find all the details here.