Hacker News new | past | comments | ask | show | jobs | submit login
[Ask HN]How do I learn ruby on rails, if I already know a few other frameworks.
20 points by shabda on Jan 30, 2010 | hide | past | favorite | 20 comments
I know Django fairly well, and want to learn Rails. Mostly, it is to know what am I missing in Django, and to port what I learn learning rails to do better Django. How should I start?

You can answer the question so it is general enough that other people may learn, but in case you want too answer something specific to me, here is what I know. I know a few languages/frameworks fairly well.

Php: Basics

Struts: Well

A few other Oracle specific frameworks: (http://www.oracle.com/technology/products/adf/index.html): Well.

Django: Very well.

[Edit]: I prefer a ebook. It does not need to be free, though.




Guides:

http://guides.rubyonrails.org/

http://asciicasts.com/ (text versions of the railscasts mentioned below)

Screencasts:

http://rubyonrails.org/screencasts

http://railscasts.com/

Books:

http://www.pragprog.com/titles/rails3/agile-web-development-...

http://www.pragprog.com/titles/fr_arr/advanced-rails-recipes

And others in the Ruby and Ruby on Rails sections at prag progammers: http://www.pragprog.com/categories

The "pickaxe book" (http://www.pragprog.com/titles/ruby/programming-ruby) is often considered the standard Ruby reference, and there is a version for 1.9.

API:

http://railsapi.com/

http://api.rubyonrails.org/

http://www.gotapi.com/rubyrails

Conference presentations:

http://www.confreaks.com/events

IRC:

irc://irc.freenode.net/#ruby-lang

irc://irc.freenode.net/#rubyonrails

Google Group:

http://groups.google.com/group/rubyonrails-talk

Ruby and Rails projects are abundant on github, providing lots of example code.


And for a good Ruby book, David Black's Well-Grounded Rubyist is pretty good: http://www.manning.com/black2/


i'll second the recommendation for railscasts. subscribe to it in itunes, watch them every week when they come out. they're not long or hard to follow, and you'll learn a lot of good material.

i've been using rails for 4 years and i still continue to learn a lot of useful things from railscasts. sometimes it's not even the topic of the video, but just some minor shortcut or rails'ism that i didn't know about.


Man it's always so crazy to see how big/well designed Rails sites are compared to Ruby sites.


My Ruby on Rails Tutorial book isn't finished yet, but the first five chapters are done, with a sixth to be released this coming week. Check it out at

http://www.railstutorial.org/book

and let me know what you think.

N.B. Most of the other resources recommended on this thread assume that you already know the basics of Rails; Ruby on Rails Tutorial aims to give you exactly the foundation you need to move on to these more advanced materials.


The agile development with rails book is pretty good to get you started. You might want to have a good Ruby reference handy too. There's a lot to learn! I went from rails to django and had a few hiccups but overall it wasn't bad. I'm interested in how well it goes in the reverse direction.


While a bit outdated, it's one of the best "getting started fast" books out there.


I second that. I'd also recommend downloading the source code to Beast (the discussion forum) and just reading over it.


Ive been in the same boat lately. Php developer wanting to learn a more modern framework/language.

I started by reading the first couple of chapters of RailsTutorial.org. That got me off to a greatstart. I then read the first several chapters of Whys poignant guide to get more of the basics. After that I dove in a started my first app and have just been learning as I go along.


I'm going the opposite way! Python/Django dev moving to PHP from small and/or CMS type projects. I'm really liking Kohana (a fork of codeigniter) as a Rails/Django etc type RAD framework for PHP.


Read the Rails Guides (http://guides.rubyonrails.org/) and check out the Rails from Scratch series on Peepcode (http://peepcode.com/products/rails-from-scratch-part-i) -- they both got me up to speed pretty quickly.


I tried reading the rails guide, but I would like something which assumes a little more experience on my part, and moves quickly in the deeper parts.


Try just in time rather than just in case learning about it, then. If you think railsguides are too easy, I won't suggest railstutorial.org, even though it's unfinished, it's excellent.

But yeah, maybe the best way for you to learn would be start a little project, and look up things as you go. Don't forget to use gems. There's no reason to write a test harness, there's cucumber. No reason to write user login systems, there's authlogic. The list goes on.


And for looking at code of a full app, Jetpack Web posted a list of some great examples (including the gems, testing framework, etc that they use): http://jetpackweb.com/blog/2009/10/14/high-quality-ruby-on-r...


$> rails myproject && cd myproject

$> script/generate scaffold item name:string description:text

$> rake db:migrate

$> script/console

>> item = Item.new({:name => "thing", :description => "blah"})

>> item.save!

>> Item.first

That's a start. The console helps quite a lot if you just want to play around with Ruby or any of the Rails modules. The list that carbon8 posted is a great start as well, and explains all the different aspects of the framework, etc.

I'm a fan of Rails and Ruby. Also, I recommend maybe switching out my "scaffold" example, installing the rspec gems, and doing "rspec_scaffold" instead. It's a good idea to get used to a testing framework if you're going to be involved in a significantly scoped project.

Enjoy!


Prag prog's book on rails is good. So is Rails Way. Prag prog's book is more tutorialish, and rails way is a good reference. I'd suggest starting with the prag prog's book and then go to rails way.


I'll tell you what you'll miss in Rails ... the forms API in Django is as God intended to. In Rails forms are coupled with models ... and this was my biggest pain when tried it ... maybe someone can point out some equivalent module for Rails?


I've heard good things about Formtastic, though never used it myself: http://github.com/justinfrench/formtastic

Forms in Rails aren't absolutely coupled to models - you can use the '_tag' form helpers to build a form that doesn't have an underlying model, or to add fields that aren't attributes on the model.


"In Rails forms are coupled with models ..."

How so?


Also, I would like to learn Rails 3, or keep as mush of what I learn applicable to rails 3.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: