views:

337

answers:

10

I want to learn Ruby on Rails. It's my first web language. I understand that Ruby is a language, and Ruby On Rails is a framework. The thing I'm not clear about is whether I need to learn Ruby in depth first, and then learn Rails afterwords. Is that right?

Or is it better to learn them simultaneously?

And, while you're at it, what's the best way to learn it?

+1  A: 

My first suggestion would be to learn a little about symbols first. Rails isn't the smallest framework ever, and while there's definitely lots to learn, most of it will start to make sense if you have at least a little bit of understanding what makes it different ("special") from other languages. As pointed out, there's no exact analog in any of the major languages, but they're heavily used by Rails, in order to make things read straightforwardly and perform well, which is the reason I brought it up. My very first exposure to Rails was also my first time looking at Ruby (well before 2.0), and the first thing that caught my eye was the goofy :things they were passing around, and I asked, "WTF is that?"

Also, check out RubyQuiz, and read other peoples' answers on that site.

Marc Bollinger
So, what DO symbols "resemble in other languages"? The answer in the first link sure is unsatisfying.
Alex JL
I fail to see how this is the worst answer on this page. Also, the wording of that sentence may be awkward to imply that there are similar constructs (it's late), but I certainly didn't say "resemble in other languages", so don't "use quotes".
Marc Bollinger
When I was learning Rails and Ruby at the same time, I got a little confused between yaml's syntax (`foo: bar`) and symbol syntax (`attr_reader :baz`)
Andrew Grimm
This answer belongs in http://stackoverflow.com/questions/55574/learning-ruby-on-rails . If you copy this answer over, then I'll undo the downvote I've given this answer.
Andrew Grimm
Done. I'll also delete the answer at that point. Out of curiosity, wouldn't it have been more constructive just start off by commenting on the original question that this is really a duplicate to be closed, rather than mass-downvoting? I don't think most people in this question were intentionally vote-hoarding, and yet the voting seem to be pretty random, save for the "one trick pony" answer below.
Marc Bollinger
I did comment about it being a partial duplicate in the comment section. But I probably was being a bit over-the-top.
Andrew Grimm
Should there be a downvote for this comment too? `This answer belongs in stackoverflow.com/questions/… . If you copy this answer over, then I'll undo the downvote I've given this answer.` I keep seeing this everywhere. Possible duplicate? ;)
Shripad K
@Shripad K: Could be!
Andrew Grimm
+2  A: 

It's better to learn Ruby first, than start learning it simultaneously with framework. There is no silver bullet in "how to start learning", but I'd suggest Project Euler.

Eimantas
I found the [Ruby Koans](http://github.com/edgecase/ruby_koans) fairly useful for introducing some of the basics.
Chris Johnsen
A: 

You can start with Programming Ruby book and go through the initial chapters that covers about language basics. Once you are armed with basic concepts on Ruby, you may shift to Ruby on Rails. Since this is your first web framework you will have to clearly understand how a MVC framework works. For Rails, go for Agile development using Rails book. There will be a sample application (Depot App) in that book that will be developed step by step through each chapter. If you could follow that precisely as said, that would greatly improve your Ruby and Rails skills.

Here are those books if you want to download.

Bragboy
+6  A: 

I don't think I'd recommend you start with Rails. There's a lot of magic going on, and when I first started, I was frustrated because I didn't know what all the conventions were. I'd recommend you start with http://sinatrarb.com It's simple enough that you can learn ruby while still being able to create sites. Once you get a little more comfortable with the language, then you can tackle rails.

Jeff D
Considering that this is your first language Jeff is right on the money with his answer. If you have a solid web programming background it is not hard to learn both at the same time, but if this is your first foray into web programming you will have a very hard time of it.
sosborn
+2  A: 

I'm surprised no one has mentioned Why's (Poignant) Guide to Ruby. Why may not be around anymore but the guide is easy to find on the net (Google points here first) and provided my introduction to Ruby as well as an introduction to programming in general for my 13 year old brother. To give a general idea to the language used to introduce new concepts: the guide first describes Ruby symbols as like an "antacid for the computer".

After the guide, I'd recommend either one of the books the others have suggested, or following the series of screencasts at Learning Rails which is how I picked up enough Ruby on Rails to be dangerous. Once you've completed the Learning Rails series. what you want to do with Rails will start to diverge from the general tutorials and that's where Railscasts becomes a wonderful tool. There's not much can be done with Rails that Railscasts hasn't touched on at some point.

nuclearsandwich
This answer belongs in http://stackoverflow.com/questions/55574/learning-ruby-on-rails . If you copy this answer over, then I'll undo the downvote I've given this answer.
Andrew Grimm
nuclearsandwich
Thanks for that. No, there currently isn't a "move answer" button: http://meta.stackoverflow.com/questions/56670/should-users-be-able-to-move-their-answer-to-a-more-appropriate-question . Also, can you give this answer (not the one in the other question) a minor edit so I can reverse the downvote please?
Andrew Grimm
A: 

http://www.javapassion.com/portal/ruby-jruby-and-rails-development-with-passion/ruby-jruby-and-rails-application-development-with-passion

It's very good online course and it's free. Ruby basics, JRuby and Rails. Best of luck.

This answer belongs in http://stackoverflow.com/questions/55574/learning-ruby-on-rails . If you copy this answer over, then I'll undo the downvote I've given this answer.
Andrew Grimm
... and you'll need to give this answer a token edit so I can un-downvote it. Sorry.
Andrew Grimm
+1  A: 

Simple way do is informal Learning ! ,Think about an application that you want to develop , any simple application start gathering requirements and work on it. If you want learn rails without developing an application it will take long time.

First learn the basics of ruby and start experimenting with rails .

Some of the resources which comes handy in your development :

Programming with Ruby

Agile Web development

Proactive Record :

Most useful Rails plugins, Ruby libraries and Ruby gems

"Develop and Learn is my mantra" .

Hope it is helpful !

YetAnotherCoder
A: 

Ruby is pretty much a one trick pony - RORs. If you want a real platform with connectivity with just about everything on the planet that can talk to a computer you might want to use Java... Beware of ppl who say you type less w/ Ruby... but what happens if you want a real IDE, want to refact, want integration outside of just doing ROR...

mP
A: 

Supposed you have learnt some object-oriented programming language(s) before. Otherwise, learn Ruby first and get the concept of object-oriented programming language.

My best practise is learning by doing. You can start with both. Ruby on Rails offers you something to archieve, like building a decent web site, and Ruby is the powerhouse of your archivement. Reading others' codes (and sample codes) helps you to learn and build quick. Some special features of Ruby are frequently used in Ruby on Rails and you have to learn some time or later, like block and symbol. You can mimic first and dig into it later.

OmniBus
+1  A: 

Id recommend Railscasts helped me allot when learning rails. Weblog in 15 Minutes is also a good screencast to watch, takes you from creating the app through to a full blog with comments.

Arcath