

Ask HN: How should I get started with Ruby & Rails? - stinky613

I've decided to finally learn Ruby.  As the majority of my coding is for the web, I'm also looking to start working with Rails; however, I'm getting more and more flustered.<p>I have a basic Dreamhost account as well as an iMac running Apache/Rails/SVN/et al.  On both servers I've put a CHMOD 755 Hello World test.rb file that will only run properly in my iMac's cgi-bin.  My Dreamhost account doesn't have a cgi-bin that I'm aware off, and attempts to use .htaccess 'AddHandler cgi-script .rb' have failed.<p>What's more, I'm just not sure how to get started with Rails once I have everything running smoothly.  Should I be bothering with Rails 2.3 or should I be "looking to the future" by learning Rails 3?  There are an overwhelming number of tutorials--are there any that you would recommend above others?<p>I've been banging my head on my keyboard trying every idea and googling every question, but I'm at the point where my morale is dipping.  Can anyone help?
======
billturner
You're starting at a tricky time. Rails 2.3 is still a great, stable platform
and should be sticking around for quite some time.

Rails 3 does have many improvements, but it's still a "beta" in every sense of
the word as many of the plugins don't work yet, or require many modifications
to work.

I still think just about the best book/introduction to Rails is the Pragmatic
Programmer book: [http://pragprog.com/titles/rails3/agile-web-development-
with...](http://pragprog.com/titles/rails3/agile-web-development-with-rails-
third-edition) \- They don't yet cover Rails 3 yet, but in the meantime you
could fill in the gaps with weblog posts and the like. If you get a solid grip
on 2.3, you should have no problem adjusting to 3.0 once it becomes final.

------
mbrubeck
Enable Passenger (mod_rails) on your Dreamhost account, then you can just
upload Rails applications (or other Rack apps like Sinatra) to a directory and
they will run:

<http://wiki.dreamhost.com/Passenger>

I would skip CGI if your goal is to learn a framework like Rails. If you want
to write a simple one-file web app in Ruby, check out Sinatra. But if you have
some existing CGI scripts that you want to run, you can add the +ExecCGI
option as described in <http://wiki.dreamhost.com/CGI>

------
vital101
I followed <http://guides.rubyonrails.org/getting_started.html> with moderate
success. I'm a PHP programmer by trade, and that guide was easy enough for me
to understand. As far as 2.3 vs 3.0, I don't know enough about RoR to weigh
in.

