views:

189

answers:

8

Disclaimer - Ruby is the first language I've ever learnt. I don't have any CS background.

I've worked through "Learn to Program" by Chris Pine which has been enjoyable and I now understand the basics pretty well. The next recommended book would be "Programming Ruby 1.9" (the next PickAxe). From what I've read it's just a massive reference book but it's 960 pages and that scares me.

What, in your opinion, would be the next 'gotta-know' concepts that I should learn?

Thanks in advance.

+1  A: 

Have a look at Humble Little Ruby Book(free) to be more familiar with other few concepts.

Another book will be Ruby for Rails.

khelll
+1  A: 

You don't actually need to know anything fancy about Ruby to be able to put together a Rails site. I started out just hacking my site together, noticing nice language constructs and seeing what they do in the source code of plugins and gems I was using.

The gratification of building something quickly in Rails will keep you going.

There is more than enough in terms of Rails conventions to learn to keep your mind busy and getting advanced in Ruby is not going to be a priority for some time.

Go through the Rails guides http://guides.rubyonrails.org/ to start building functionality.

Matthew
+4  A: 

Blocks and a bit of metaprogramming.

Geo
+3  A: 

A good starting point (it was that for me...) are the Ryan Bates screencasts on Ruby on Rails: http://railscasts.com/ (start from the lowest numbers first...)

Carlo Pecchia
Just a thought, RailsCasts is about programming rails applications. They're excellent tutorials...well thought out, and well produced, but they talk about Rails application development, not ruby.
btelles
Sure, but the screencasts can (quickly) give you an idea about how Ruby is used.
Carlo Pecchia
+1  A: 
  1. Blocks related stuff (blocks, Proc, lambda)
  2. Modules
  3. method_missing
IDBD
+3  A: 

I checked the tutorial you read. There is one very important concept that is missing: symbols. You can find information in "ruby learning". They are used a lot in rails as option names.

Another concept that puzzled me when I tried reading rails examples was the fact that, when an hash is the last argument of a function, curly braces can be ommited. So:

def foo( 1, "blah", "a" => "b", "c" => "d" )

should read as:

def foo( 1, "blah", { "a" => "b", "c" => "d" } )

The function foo takes only three arguments.

paradigmatic
A: 

The most fun I've had reading about a programming language was _why's Poignant Guide to Ruby.

It's hilarious, artsy, and well written. Also, there's an intro to Ruby in the Appendix of "Agile Development with Rails." That seemed to have just the right amount of programming intro to get started.

http://en.wikipedia.org/wiki/Why%27s%5F%28poignant%29%5FGuide%5Fto%5FRuby

http://mislav.uniqpath.com/poignant-guide/

btelles
A: 

The big thing for me was what self means at different points in a class definition, and the idea of instance variables vs class variables vs singleton variables.

class Foo
  @variable # is an instance variable on the class object, not on instances derived from this class
  def bar
    @variable2 # is on instances derived from this class
  end

  def self.baz # this is a class level method, similar to static methods in something like java
    @variable3 # gets defined on the class object again
  end
end

f = Foo.new

def f.wtf #this method gets defined only on this single instance of Foo
  @variable4 #this variable will only be for the f instance
end

This sort of thing tripped me up in rails all the time before I got good at ruby, but grokking the idea of class objects, object individuation, and what self was pointing at in any given place was hands down the hardest thing for me to learn.

Matt Briggs