7 ms·
Ruby on Rails Tutorial, 2nd edition
- mhartl 15y agotl;dr: The Rails Tutorial 2nd edition PDF is out; early access to the 2nd edition screencasts is open; use the code "rt2ndEd" through the end of April to get a 20% discount. Go to http://railstutorial.org/ http://railstutorial.org/ for more information. By the way, I finally broke down and got an iPad (way overdue, I know), which finally motivated me to fiddle with the Rails Tutorial PDF fonts. The result (14pt for the main text and ~10pt for tables and code samples) was a bit tricky to achieve, but it looks good on a Kindle and great on an iPad. Someday I may go to the trouble of making ePub and mobi formats as well, but for now the PDF is smokin'.
- stevengg 15y agoHow are the 2nd edition screencasts going to differ from the first edition ones?
- mhartl 15y agoFrom http://ruby.railstutorial.org/#new http://ruby.railstutorial.org/#new: Fully updated for Rails 3.2 and Ruby 1.9 All-new design using Twitter's Bootstrap Coverage of the new asset pipeline, including Sprockets & Sass Behavior-driven development (BDD) with Capybara & RSpec Better automated testing with Guard & Spork Roll your own authentication with has_secure_password An introduction to Gherkin & Cucumber I've also converted to a two-pane editor setup using Sublime Text 2, which is especially nice for TDD. See http://youtu.be/REuxSzMtcJA http://youtu.be/REuxSzMtcJA for a sample video.
- nicw 15y agoI have the first edition and it's great. You can either poke around on Stack Overflow for hours to see what the "best" approaches are - OR just get this book and bookmark heavily :)
- msluyter 15y agoWent through this recently and it's great. Bootstrap is a nice addition -- I know people complain about too many Bootstrap sites, but developing something that looks good right off the bat is highly satisfying. The only problem I ran into is that when using spork and guard, the test environment didn't always get reloaded (not sure if I recall the exact conditions in which that happened) and so I got some unexpected errors/test failures on occasion (resolved by restarting spork/guard). There's a stack overflow entry on this, iirc.
- kaonashi 15y agoThe thing I like most about using bootstrap together with less is just how easy it is to override the default styles. You can use bootstrap just to get something in the ballpark, and then just tweak it to get to something that's final.
- mhartl 15y agoThe Spork caveat is mentioned in the book (http://ruby.railstutorial.org/chapters/static-pages#code:rspec_drb http://ruby.railstutorial.org/chapters/static-pages#code:rsp...): One word of advice when using Spork: after changing a file included in the prefork loading (such as routes.rb), you will have to restart the Spork server to load the new Rails environment. If your tests are failing when you think they should be passing, quit the Spork server with Control-C and restart it. That doesn't mean you won't end up on Stack Overflow, though. I end up there all the time myself, and I wrote the damn thing.
- kiba 15y agoThat doesn't mean you won't end up on Stack Overflow, though. I end up there all the time myself, and I wrote the damn thing. If that was eliminated, than spork would be an absolute no brainer.
- deleted 15y ago[deleted]
- edwinnathaniel 15y agoI purchased the first edition, any upgrade plan?
- mhartl 15y agoCheck your email for a coupon code. As far as upgrading the app itself, so much has changed that I recommend starting from scratch. (It'll go much faster the second time around.)
- edwinnathaniel 15y agoMy bad, just checked my e-mail. Thanks!
- alexanderberman 15y agoJust bought the screencasts! Very excited :D
- mrhlee 15y agoSame here. Looking forward to watching and learning a ton!
- airlair 15y agoBeginner here, I'm a mechanical engineer with very little experience with programming. I tried to follow the book this week but found it little bit difficult to follow. Question: Should I go learn the basics of Ruby first or should I power through hoping to learn everything along the way? If you think that I should learn the basics first, would you recommend learnrubythehardway or something else? Thanks in advance!
- mhartl 15y agoIf you're finding the programming challenging, I recommend Beginning Ruby by Peter Cooper.
- MaxGabriel 15y agoAre you specifically trying to learn Ruby on Rails? Or just programming/just web development?
- airlair 15y agoYes, ruby on rails. Learning to start on a webapp project I have in mind. The reason I want to learn ruby on rails as oppose to PHP or Phython is because my friend/partner is more comfortable using ruby on rails. Therefore, in order to collaborate with him, I should learn ruby on rails. Having said all that, I would still like to hear your opinion on what language I should start on.. if you have one. Thanks.
- adriand 15y agoLearning Ruby on Rails will give you a great understanding of how to build web applications, it will give you lots of tools that let you do so quickly, and it will introduce you to an elegant, powerful language that is a joy to use. But the best reason for you, personally, to learn RoR is that you have a friend and partner that would like to collaborate on something with you, and they are (hopefully!) willing to help you.
- escalona 15y agoI started learning Ruby and Ruby on Rails a few months ago. I've found it much easier to learn the basics of Ruby before diving into Rails. I started with reading Learn to Program by Chris Pines. The book is aimed at someone new to programming. Does a great explaining programming and Ruby.
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- akurilin 15y agoPurchased and read back to back the first edition of the book. Very glad to see an updated edition, it hasn't been that long, but a lot has changed in the meantime! Michael, I was looking through the online version of the book and I couldn't find any indication that I was reading the 2nd edition. I apologize if I simply missed it, otherwise I think it might be worthwhile mentioning in the preface that what we're looking at the 2nd ed.
- mhartl 15y agoThe Rails version number is highlighted in the right-hand margin (3.2 indicating the 2nd edition). Also, to make the choice easy, the 2nd edition is now the default.
- akurilin 15y agoAwesome, thanks!
- algobait 15y agoIt took me about 30 min today to figure out why when I started Chapter 5 your Application Controller had different content than mine (missing the blueprint, etc). Would you recommend the 2nd edition although I am halfway through the first edition?
- mhartl 15y agoYes, I recommend switching to the 2nd edition. I suggest you start with Chapter 3.
- alexol 15y agoI am reading the book on safaribooksonline and commit to github. ( https://github.com/alder101/rails-tutorial https://github.com/alder101/rails-tutorial ) The book is great. Thank you Michael. I think that experience of reading such "Learn by example" books would be even better if: * Each chapter or section are issues on github. * Examples are commits, associated with the issue. * Extensive use of labels as book index.
- mhartl 15y agoI agree in principle, but the situation you describe would be a maintenance nightmare on my end.
- philjones88 15y agoThis does look interesting. Can't quite figure out if it would suit me. I'm interested in learning Rails but I haven't done any Ruby before. I do a lot of C#, ASP.NET MVC, RavenDB, MySQL/SQL server and AppHarbor, so I understand MVC and web development environment from the .NET side. Would you think this book and screencasts would work for my skill level or should I use another book to learn more about Ruby?
- andrest 15y agoIt's definitely worth reading. Although as a person with substantial programming experience, I would recommend you to have a look at Chapter 4 first. The first few chapters deal with code examples that are not meant to be understood (at that point), but knowing the "Ruby way" will help you to figure out most of it. The book also is more holistic about Web Development; Rails, although being the main focus, isn't all that it covers. Version Control (GIT) and Deployment are explored as well. Also, the author having beginners in mind, goes through the terminal stuff a bit slower. You might find yourself skimming few pages along the way, but the book does an extremely good job at getting you to the point where you can and know what you want to do next.
- studgeek 15y agoIt would be nice to cover Ruby/RVM under Cygwin as well in addition to RailsInstaller. As long as the right Cygwin packages are installed (git, readline, wget, patch, make, gcc, libsqlite3-devel, libxml2-devel, libxslt-devel) RVM installs just fine and then the reader will be able to follow all the remaining examples in the book directly. You could add something like this: Ruby with Cygwin (Windows) Another option on Windows is install Ruby under Cygwin. If you are already using Cygwin then installing RVM and Ruby is done the same way you would do it on Linux/OSX. If you do go the Cygwin route then throughout the rest of the book just follow the Linux/OSX examples. Here are the steps: First, make sure you have the following Cygwin packages installed: git, readline, wget, patch, make, gcc, libsqlite3-devel, libxml2-devel, libxslt-devel. Then install RVM: curl -L get.rvm.io | bash Then just follow the steps listed in the next section to install Ruby.