We hope that you’ll have a great time coding with us over the weekend during the Ruby on Rails workshop. But before we start, your machine will need to be ready for the challenge. Here is a quick checklist of what you should set up beforehand.
Hi there! Congratulations on getting a spot in one of our Rails workshops! We hope that you’ll have a great time coding with us over the weekend. But before we start, your machine will need to be ready for the challenge. Here is a quick checklist of what you should set up beforehand.
At Netguru, most of our devs work on Macs, but any Linux distribution is just as good for Rails development. You can read more about why we don’t recommend using Windows for Rails development.
PostgreSQL is our database of choice (both for projects at Netguru and during workshops). Make sure that it is installed on your machine and that you have set up proper users and roles.
Which version of Ruby will you need for the workshops? We can’t say at this point because Ruby gets updated very often. However, there are tools that help manage multiple versions of Ruby on a single machine. The choice between RVM and Rbenv is yours to make. I personally use Rbenv, but RVM is just as good.
You’ll need Bundler for managing gems.You can install it together with Ruby and Ruby on Rails, when you install RVM.
We use Git as our version control system.
We try to use rebasing as a standard way of pulling to avoid merge commits.
However, it is understandable if you aren't comfortable working with Git in a team environment, where people commit in real time to the same branch as yours. Therefore, I recommend installing git-up. This is a gem that will make pulling changes from other team members easier. It fetches all the branches that you’ve checked out locally and rebases the changes in 1 command.
We will deploy our apps on Heroku, and Heroku Toolbelt will make everything as easy as possible.
Part of the application might require uploading images and resizing them for thumbnails. Both carrierwave and paperclip require ImageMagick to do the heavy-lifting for them.
You can use any text editor you want (at Netguru we use mostly Sublime Text, Vim and Atom), but we have a few rules about how code should be formatted.
Most editors can be set up to do these tasks automatically for you. Here is an example settings file for Sublime Text that sets these up:
Sometimes not everything goes according to plan. Or, you might be on a Windows machine. Don't worry, however! There is a plan B! And this one can't fail :)
Below is a Vagrant setup that will create an Ubuntu VM image on your machine. Think of it like a script that will download the base Ubuntu image and install everything for you.
Also, you need to download the Rails Dev Box (or this modified version to speed things up), which contains Vagrant configuration files for a basic Ruby on Rails development environment. You will have to extract files from the downloaded folder, open the context menu inside the folder, click on “Git Bash Here”. In your Git console, type the following instruction:
vagrant plugin install vagrant-winnfsd. After installation of the nfs plugin for windows, type:
vagrant up - and now Vagrant should start booting up the machine. It might take a few minutes when starting for the first time.
After Vagrant has prepared everything, you can log into your vagrant machine by typing
vagrant ssh and you should have access to your machine from the Git console!
cd /vagrant This instruction should take you to the folder shared with your host machine (Windows).
You can start developing rails applications by using
rails new application_name(read this guide for more information). Enter your rails application project’s folder and run the server by typing:
rails s -b 0.0.0.0
If everything goes smoothly, when you launch
localhost:3000 in your Windows machine’s browser, you should see the Rails welcome page!
Here are some links you should find helpful:
We know you might have more questions about our Ruby on Rails workshops - and that's why we prepared this FAQ post. Enjoy and apply!
P.S. Special thanks to Marcin for creating the step-by-step manual above - you rock!