views:

197

answers:

4

Possible Duplicates:
Do I need to know Ruby in order to learn Ruby on Rails?
Should I start with Ruby or Ruby On Rails?

I'm going to start playing with ruby, is it better to learn the ruby language alone or at the same time as learning rails?

+4  A: 

I always consider it better to learn a language before a framework based on the language, unless you are very experienced with programming languages and know you can adapt quickly to both a language and a framework.

Usually frameworks handle various tasks in complex ways, which would be confusing if you didn't know the inner tidbits of the language.

You don't have to master the language, learn the basics - datatypes, language rules, do some programming tasks using that language for a week or two and you'll be in better shape to adapt to the framework.

To go a bit further, as an example I have been DOM Scripting with JS before jQuery existed, and because of my experience with the JS language I was much more comfortable grasping how jQuery's inner core works.

I learned some basic Python before I jumped into Django, I'm sure it's no different with Ruby/Rails.

meder
I agree that Ruby should be learned first. Ruby has a lot of quirks that make it different from a lot of other languages (in a good way). It is entirely possible to dive straight into Rails, but you'll be a much better programmer if you learn Ruby first.
Karl
A: 

Is it better to know how to operate an oven before baking? Yeah, probably.

I've seen many people learn a language while learning the framework from the Django world. The #1 problem is they don't know what's Python and what's Django, and it all just becomes one mish-mash.

I'd learn Ruby until you feel comfortable doing basic things with it. Understand looping, printing, file I/O, classes, and the variety of built-ins you can deal with in Ruby. Then, start playing with Rails and you can continue to learn Ruby now that you've built some foundation.

Bartek
+1  A: 

I'd take the answer straight from the Rails' folks' mouths. From the RoR website:

It is highly recommended that you familiarize yourself with Ruby before diving into Rails. You will find it much easier to follow what’s going on with a Rails application if you understand basic Ruby syntax. Rails isn’t going to magically revolutionize the way you write web applications if you have no experience with the language it uses.

You can probably whisk through the tutorial without prior knowledge of Ruby. But I think you'll quickly hit a wall when you try to do something with Rails without having learned Ruby first.

BTW, the RoR page linked to above has some good links to learning Ruby, but a couple of links are broken. Here are the more up-to-date ones as of 13-Jul-2010:

I can't resist noting that Why's guide is utterly barmy and almost maddeningly digressive, but remains one of my favorite programming books for any language. Go forth, chunky bacon!

Owen S.
A: 

Hi Robert.

As per my understanding its always better to start with ruby. Because ruby is not rails but rails is 100% ruby. Having said that, if you can understand how ruby works, you can better understand rails.

But there is no line between at what point you should start rails. But its better you have the basic idea on how ruby works before jumping to rails.

And rails plugins are very good resources for you to understand concepts like metaprogramming, callbacks etc..

happy programming

cheers,

sameera

sameera207