Ruby on Rails - Need to Know

1. What is Rails?

Rails is a web application framework designed to work with the Ruby programming language. Sound like mumbo jumbo?! I know!

Here’s the BIG idea: there is a programming language called Ruby. It’s super fun to write. In fact, the guy who first created it said that his major motivation when writing the language was to design a programming language that would make programmers happy. Nice, right?

Let me give you an example.

If I want to print something to the screen in PHP I need to write:

echo “Hello World”;

Notice the semi-colon? And what does echo even mean?!!

On the other hand if I wanted to do the same thing in Ruby alls I would write is:

puts “Hello World”

No semi-colon, and puts may be a little… juvenile, but it makes more intuitive sense to me than echo.

Seriously, when you spend hours and hours a day writing code, it’s the little things that make a HUGE difference.

So, anyways, the only problem with Ruby was that it’s not designed for use on the Web. Like…you couldn’t really use it to make websites, per se. That is until… Rails!

I am not sure if Rails was the first web framework for Ruby but it’s DEFINITELY the most popular.

What Rails does is provide all this fancy scaffolding and stuff to make it possible to write a Ruby application and have it be a website. This sounds really abstract when you say it here, but it’s basically like this: if I were to write

puts “Hello World”

in an HTML document, you would just see the whole thing (just like you do there!). What I actually want is for you to ONLY see

Hello World

To put it in the simplest way imaginable, Rails makes that possible. But it also does SO SO SO SO much more.

2. What’s Ruby on Rails?

Ruby on Rails is the FULL, legal name for Rails. But when speaking about it most developers drop the “Ruby on” part and just call it Rails.

AKA, to be a cool tech insider, you should definitely call it Rails, but feel smug because you KNOW what the “Ruby on” bit means.

3. I’ve heard Rails is great for beginners. How so?

There are a few reasons why Rails is so great for beginners. The first reason is simply that Ruby is really great for beginners, so that’s a big win. Learning to program in Ruby is much easier than in other languages because the language is super flexible and very forgiving, which translates to more time spent absorbing programming fundamentals and less time banging your head against your desk.

Now, why Rails is so fun for beginners is because it’s really really robust and it does SO MUCH of the hard work for you.

The way I describe it is that Rails is kinda like driving an 18-wheeler. It’s crazy powerful and WHOA look at you, you’re driving an 18-wheeler!!! But do you really understand how the 18-wheeler works?

In other words, the fact that Rails takes care of so many things for you will allow you to do a bunch of fancy things right off the bat. But it can be a double edged sword because sometimes you can get a little ahead of yourself and not really learn the fundamental stuff you gotta know.

For that reason, it’s really important to really learn Ruby on Rails from the ground up, and in particular, make sure you are super comfortable in Ruby.

Otherwise you are going to hop down from the 18-wheeler and say to yourself: Wait a minute! I was driving that thing?!?!

4. How is a Rails developer different than a Ruby programmer?

Technically the answer would be that you program applications in Ruby but don’t use Rails.

Honestly, this is sort of an edge case. Hypothetically, you could work on Ruby web apps using other web frameworks like Sinatra, but I would wager that a good 99% of the time you aren’t going to get hired JUST to write Ruby. So it’s best to start learning Rails!

5. How good at Ruby do I need to be? What should I learn before I dive in?

Opinions on this really vary, but per my 18 wheeler example above, I personally believe you should be pretty comfortable in Ruby before you dive into Rails.

It’s like…you should probably ride a bike before you drive and drive a regular car before an 18 wheeler.

The bottom line is that a HUGE chunk of your time spent working in Rails is really going to be spent writing Ruby. So go native!

In terms of specifics, well, you need to know all the basics like data types, methods, object orientation, debugging, etc.

But you don’t need to be an EXPERT Ruby coder, just comfortable.

6. Why should I learn Rails? What makes it so special?

It’s just elegant, and awesome. What more do you need to know?

No, in all seriousness, when Rails launched it was a total revelation because it was just an amazing feat of design. Rails is designed with the best best practices in mind so it basically guides you into writing awesome code even if you don’t want to (or wouldn’t know how).

This means that if you want to write robust web applications that will scale as you need them to and be easy to maintain as you go forward, Rails is an awesome way to go.

Oh and plus it’s super hot and tons of fancy companies are using it. That’s cool too…

Aack! I forgot another important thing!

One of the reasons why Rails is so popular with tech startups is that it’s really great for rapid prototyping. You could think of a Rails app you want to build and have it up online and ready to go within a few hours. There are very few frameworks that could make that possible.

7. What can I build with it?

What are you thinking of building?!! Really if it’s a web application you can build it with Rails. Just check out some of these examples of websites that are built with Rails: Hulu, Airbnb, Basecamp.

8. Can I do anything on mobile with Rails?

Yes and well, okay sorta. You can’t literally build a mobile app in Rails, no, but you can definitely build a web application in Rails and have it serve as the backend for a mobile app.

There is also this thing called RubyMotion which basically makes it super easy to build native iOS and Android apps using Ruby. But that’s Ruby and not Rails.

In other words you won’t LITERALLY be using Rails to create a mobile app that you sell in the Apple Apps store, but Rails can definitely be an important part of a mobile project.

Sorry for the confusing explanation! These lines are a little blurry.

9. What kind of job can I get?

Rails is one of the most in-demand skills nowadays, so you can choose from all kinds of companies to work for.

Start-ups especially love Rails, so you could join an early stage company like Zearn, a non-profit digital education company.

Or you can join a major corporation like Bloomberg to be a part of developing websites and apps used by millions.

And even freelancing is a great option for Rails developers. Being independent, you can choose to work on small, short-term projects or work with a variety of clients longer term.

10. I tried [insert programming language here] and didn’t love it. Why should I give Rails a shot?

Well, just to split hairs, remember Rails isn’t a programming language per se, it’s a framework.

So if you are wondering about whether there is any hope for you to ever like a programming language, alls I can say is that Ruby is the most lovable programming language in the world so I don’t think you should write off programming until you’ve at least given Ruby a shot.

11. Are you sure I shouldn’t learn JavaScript instead?

Instead, no? Also, YES.

The truth is that as a Rails developer you are going to need to learn JavaScript. It’s not a prerequisite for learning Rails but it is a skill you will need as you progress.

Honestly, as you go deeper and deeper into the world of tech you will find that you need to be passably fluent at a fair number of different technologies (I like to refer to this as being a little bit full stack). Luckily, it becomes easier and easier to pick up new languages and frameworks as you gain experience.

Now, whether to learn JavaScript or Rails first…hmmmm….honestly, you can’t really go wrong. I will say that Ruby is easier to learn than JavaScript and I have seen students who learn it first have an easier time with JavaScript, but like I said, as long as you eventually get around to learning both you will be good to go.

12. How long will it take me to learn?

How much time will you be devoting to learning a day? I do believe that you can get a very good understanding of Rails within a few months of dedicated study.

But look, to become a Rails master it’s going to take you 10,000 hours just like any other skill, so the best thing you can do for yourself is get started.

And of course, your level of familiarity with programming in general will have a big impact on how quickly you pick up Rails.

But if you are an absolute beginner, Ruby and Rails are two great places to start (see question above).

13. How did you get started? What should I do first?

Sign up from the Skillcrush Ruby on Rails Blueprint of course!

You didn’t think I was going to pass up an opportunity like that, did you?

If you have NEVER written a single line of code in your life, the very first thing you need to do is get your HTML & CSS on. Luckily, HTML & CSS are relatively easy to pick up 🙂

Then you need to learn Ruby, Git & the command line.

In our blueprint we then ease you into Rails by having you work on Sinatra and ActiveRecord first. Obviously, that’s not going to mean a lot to you now, but the basic idea is to have you work in Rails lite before we put you in the drivers seat of that particular 18 wheeler.

The MOST important thing you can do for yourself when learning something is having a project to work on, something to work towards and some way to know that you’ve gotten where you want to go and of course, lots of support! You are going to have a million small questions as you go and having someone to help you make sense of it all and cheer you through the hard parts is absolutely crucial for your success.

Written by Randle Browning

GOOD THINGS COME TO THOSE WITH AN E-MAIL

Leave yours here for a chance to win a FREE logo design at the end of each month!
Spam FREE, I promise.