

[Ask HN]How do I learn ruby on rails, if I already know a few other frameworks. - shabda

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?<p>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.<p>Php: Basics<p>Struts: Well<p>A few other Oracle specific frameworks: (http://www.oracle.com/technology/products/adf/index.html): Well.<p>Django: Very well.<p>[Edit]: I prefer a ebook. It does not need to be free, though.
======
carbon8
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/rails3/agile-web-development-
with-rails-third-edition)

<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.

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

------
mhartl
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.

------
stanleydrew
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.

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

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

------
pstinnett
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.

~~~
mclin
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.

------
ams1
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.

~~~
shabda
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.

~~~
steveklabnik
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.

------
billturner
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...](http://jetpackweb.com/blog/2009/10/14/high-quality-ruby-on-rails-
example-applications/)

------
dylanz
$> 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!

------
hsuresh
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.

------
bad_user
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?

~~~
bhousel
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.

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

