What is the best way to learn rails 3.0 with no prior rails experience?

What is the best way to learn rails 3.0 with no prior rails or ruby experience? I'm just curious about it and want to get started.

Do I start with 3.0 or 2.0?

If one is a very good OO developer and knows Java and Scala really well, would it be hard to get by with rails without knowing much ruby? (basically learning book at the same time).

Any good books that do a fantastic and thorough job at not really explaining how an MVC works but how everything works in rails specifically? Something that doesn't just look at "the most basic case", but really gets in there above a basic CRUD app.

I was flipping through a book about rails 2.0 at Chapters and the first 20 pages kept giving a sales pitch about how easy rails is, and yadda yadda. It tended to rip on java a lot... but since I know Java really well, I thought the author didn't know what he was talking about. His comparisons and examples of Java were biased... either comparing it to the language itself or to frameworks that I wouldn't even consider using because they suck (struts, etc.). I think his goal was to make it look worse than it really was. Spring 3.0, while not ideal, isn't nearly as bad as the author was letting on... and I guess I lost confidence in the author because he didn't even bother to mention Spring.

Anyway, any advice to some lean yet informative and intelligent books would be helpful. I thought the Scala book written by Martin and crew was fantastic, so if a book exists at that caliber, I'm very open to reading it.

Thanks

egervari wrote:

What is the best way to learn rails 3.0 with no prior rails or ruby experience? I'm just curious about it and want to get started.

Do I start with 3.0 or 2.0?

If I were starting today, I'd probably learn Rails 3.

If one is a very good OO developer and knows Java and Scala really well, would it be hard to get by with rails without knowing much ruby? (basically learning book at the same time).

Make sure to learn enough Ruby that you can understand what's going on.

Any good books that do a fantastic and thorough job at not really explaining how an MVC works but how everything works in rails specifically? Something that doesn't just look at "the most basic case", but really gets in there above a basic CRUD app.

You don't need that yet, I think. Learn the basics of the framework first.

I was flipping through a book about rails 2.0 at Chapters and the first 20 pages kept giving a sales pitch about how easy rails is, and yadda yadda. It tended to rip on java a lot... but since I know Java really well, I thought the author didn't know what he was talking about. His comparisons and examples of Java were biased... either comparing it to the language itself or to frameworks that I wouldn't even consider using because they suck (struts, etc.). I think his goal was to make it look worse than it really was.

I do know Java fairly well. I also know Ruby. Java is so inflexible by comparison that I'd be quite happy never to use it again (except in the context of something like JRuby).

The big advantage of the Rails framework (that no one talks about) really is the Ruby language. This is why no PHP or Java framework can compare to it IMHO.

Spring 3.0, while not ideal, isn't nearly as bad as the author was letting on... and I guess I lost confidence in the author because he didn't even bother to mention Spring.

Which? He said it was bad or he didn't mention it? You can't have it both ways.

Anyway, any advice to some lean yet informative and intelligent books would be helpful. I thought the Scala book written by Martin and crew was fantastic, so if a book exists at that caliber, I'm very open to reading it.

Agile Web Development with Rails? (Never read it, since I don't do paper books for programming most of the time, but it is the "canonical" book.)

Thanks

Best,

I would recommend the book Agile Web Development with Rails. I know there is a new version for Rails 3. I think if you do the practical tutorial part, which if I remember is only maybe 100-200pages, you should just jump in. I came from asp.net and this worked for me. Then soon you will want to learn more ruby but seriously, I think you can become dangerous pretty quick with this book if you learn well doing self directed stuff.

David

David Kahn wrote:

I would recommend the book Agile Web Development with Rails. I know there is a new version for Rails 3. I think if you do the practical tutorial part, which if I remember is only maybe 100-200pages, you should just jump in. I came from asp.net and this worked for me. Then soon you will want to learn more ruby but seriously, I think you can become dangerous pretty quick with this book if you learn well doing self directed stuff.

Just do all development test-first (I recommend RSpec and Cucumber; avoid Rails' fixtures entirely and go straight to factories). And of course, use version control.

David

Best,

Yes, I do test-first for the last 8 or so years. I am a little familiar with RSpec's design because ScalaTest has parts that are blatant ripoff of RSpec :wink: I love ScalaTest, so I will probably like RSpec.

What do you mean by factories? I know of the factory pattern, but what do you mean specifically?

Also, is it easy to disable the testing framework that is shipped with rails and get it to use RSpec?

What is the best way to learn rails 3.0 with no prior rails or ruby experience? I'm just curious about it and want to get started.

Learn Ruby first. Or at least enough Ruby that you don't think of Rails as being magical.

http://humblelittlerubybook.com/ - Free (donations welcome). I've never read it...

The Well-Grounded Rubyist - Excellent.

Rails 3 in Action - Rails 3. Not out yet, but seems good so far.

Disclaimer - I like manning's books and have reviewed several. I'm sure there are other good ones as well... I don't get anything for it, but there you go :slight_smile:

Do I start with 3.0 or 2.0?

3.0.

If one is a very good OO developer and knows Java and Scala really well, would it be hard to get by with rails without knowing much ruby? (basically learning book at the same time).

Personally I think you'll hit the wall at "above a basic CRUD app". You'll have an advantage over someone who doesn't know any language well, but spending a couple of days cruising through some ruby books will certainly be time well spent.

-philip

egervari wrote:

Yes, I do test-first for the last 8 or so years. I am a little familiar with RSpec's design because ScalaTest has parts that are blatant ripoff of RSpec :wink: I love ScalaTest, so I will probably like RSpec.

What do you mean by factories? I know of the factory pattern, but what do you mean specifically?

Nothing particularly closely related to the Factory pattern (which isn't necessary in Ruby that often). Check out the Factory Girl and Machinist gem docs for an explanation of the idea.

Also, is it easy to disable the testing framework that is shipped with rails and get it to use RSpec?

There's nothing to disable. If you don't want to write Test::Unit tests, just don't write any. Test::Unit and RSpec can even coexist on the same project (as is the case at my job, since we're switching gradually).

Best,

Marnen Laibow-Koser wrote:

There's nothing to disable. If you don't want to write Test::Unit tests, just don't write any. Test::Unit and RSpec can even coexist on the same project (as is the case at my job, since we're switching gradually).

Out of curiosity... Switching gradually in which direction? From RSpec to Test::Unit (+various extensions e.g. Shoulda). Or are you switching to RSpec?

I've been a fan of RSpec for some time. It's what I actually started with, but I hear a lot of buzz about various extensions to Test::Unit these days as well. I'm just interested in hearing your thoughts.

Robert Walker wrote:

Marnen Laibow-Koser wrote:

There's nothing to disable. If you don't want to write Test::Unit tests, just don't write any. Test::Unit and RSpec can even coexist on the same project (as is the case at my job, since we're switching gradually).

Out of curiosity... Switching gradually in which direction? From RSpec to Test::Unit (+various extensions e.g. Shoulda). Or are you switching to RSpec?

To RSpec. (I've been sort of pushing it, but the switch was underway before I got here.)

I've been a fan of RSpec for some time. It's what I actually started with, but I hear a lot of buzz about various extensions to Test::Unit these days as well. I'm just interested in hearing your thoughts.

I much prefer RSpec. Test::Unit encourages unreadable implementation-dependent tests, at least in my experience.

Best,

egervari wrote:

What is the best way to learn rails 3.0 with no prior rails or ruby experience? I'm just curious about it and want to get started.

Get ruby 1.9.2/rails 3/gems installed - tons of tutorials out there for a basic setup.

Buy the Pickaxe book (is it still a pickaxe for Ruby 1.9.x)

mkdir rails cd rails rails new testapp cd testapp rails g scaffold person first_name:string last_name:string

now sit down and read through the generated code to see how rails WANTS to work.

You wouldn't use a generated app for a real production application, but as an educational tool, it's a great way to get started.

Heck, I still scaffold a basic proof of concept when users come to me for the "next great addition" to our system. They even expect the initial forms to be ugly but workable...