I'm trying to learn how to use ruby on rails. Just two weeks ago I'm learning how to program in Ruby, but now I'm ready to get onto with rails. I got a book for rails but it shows me rails examples that only work with rails 1.2.3. I follow the examples, but many are not working. For example, scaffold is not working with 2.1.0 (rails version install in my computer. My question is, how do you go about scaffold in rails 2.1.0? Some pagination is not working out of the box such as will_pagination and classic_pagination. Ubuntu 8.10 is making rails more difficult, and installing will_pagination from gems didn't do the trick. Anyone know a complete tutorial that teaches how to install all necessary gems/plugins/debian packages that will help me smooth-sailing in my ruby on rails adventure? Thank You. Also I couldn't find a good beginning ruby on rails book that is up-to-date, and I know ruby on rails is a very fast moving framework as ruby is also a very fast moving programming language -- things are changing constantly for the better. Any guide to better rails way? Thanks...
on 2009-03-21 23:12
on 2009-03-21 23:27
Books are very much lagging indicators of the state of Ruby on Rails. The best documentation (for better or worse) is on the web. Start at http://guides.rubyonrails.org/ On Mar 21, 3:12 pm, Power One <rails-mailing-l...@andreas-s.net>
on 2009-03-22 04:04
Power One wrote: > My question is, how do you go about scaffold in rails 2.1.0? Forget scaffolds. They are just the bait - the teaser. Learn Rails by learning to... - create a model with script/generate - create its migration into a database - write unit tests which force that model to have methods - integrate your code into git or svn - paint a page in HTML - use tidy to clean it up - create a controller & its view - convert it to html.erb, in the view - run your app with webrick and look at it - put <%= tags %> into it - write tests showing the tags do the right thing That's the core cycle. Anything else - billions of topics, including threading, paging, Ajax, etc, you must Google for, after you understand and work that core cycle. And all the books cover the core cycle (right??!). -- Phlip
on 2009-03-22 07:04
I think that in the future we're going to be relying less and less on books in the traditional sense and more and more on up-to-date, community sponsored and updated documentation to handle a lot of what books handle right now ... especially when working with fast-moving web frameworks like Rails. That's just what I see. Rails Guides is an incredible resource, and I hope that the Wiki will become even more of an extension of the Guides than it might have been in the past. If you are looking for some books to get started with, check out Simply Rails 2 (still mostly relevant), Learning Rails, and Agile Web Development with Rails (3rd Edition). Those three are the three I recommend at the moment, but you always need to be aware that you will have to fill in blanks and think on your feet. On Mar 21, 5:12 pm, Power One <rails-mailing-l...@andreas-s.net>
on 2009-03-22 07:47
Thank so much for your guides guys! Ruby is so elegant that I'm falling in love with Rails too. It's funny that I heard the hype of rails but didn't bought into it like most people until I saw Ruby's elegant codes. I'm not a programmer but I have learn a little C, Visual Basic, PHP, and don't remember any of those :). Especially PHP, I saw how useful it is as it has large base of open source software, but whenever I look at its code, I think to myself, it is a mess. I put off learning coding for very long time, and just concentrating in some networking stuffs, but I picked up a Ruby books from Barnes and Noble once, and I fell in love with Ruby :). Maybe because I like the idea of bringing art and fun into programming than anything else. Plus, Ruby is so easy to understand and to play around with than other programming language, at least I didn't yawn when I read the examples :). Rails is a plus :).
on 2009-03-22 11:07
i can recommend this one for a good start: http://www.pragprog.com/titles/rails3/agile-web-de... DHH mentioned that it is completly 2.3 ready.
on 2009-03-22 18:32
This is another really good first rails book. it covers some really core concepts. This will help the other "deeper" books easier to get into. http://www.headfirstlabs.com/books/hfrails/ I have spent the last year learing and developing in Rails and Zend (php) and i wish i had this book a year ago.. The Agile book mentioned is also very good. i have used it as well. The Railscasts are a great place to learn small bits, as well as the tutorials on peepcode.com On Mar 22, 12:47 am, Power One <rails-mailing-l...@andreas-s.net>
on 2009-03-22 20:44
Hi there, I know it can be frustrating, even for those of us that have been in it for a while. (freezing the environment is a real chore)/ My suggesting is to forgo the print books and go straight to peepcode.com and the pragmatic programmers(http://www.pragprog.com/ titles/rails3/agile-web-development-with-rails-third-edition) sites and watch the up-to-date screen casts and buy the pdfs. The great part about rails is it's agility, and that works both ways. My suggestion is also to really learn the ruby language and the rest will follow. On Mar 21, 5:12 pm, Power One <rails-mailing-l...@andreas-s.net>
on 2009-03-23 20:04
Lots of good advice so far... I would also recommend checking out Railscasts.com. Ryan Bates offers great Rails instructional videos for free. Really, the best way to learn is to just immerse yourself: start building a blog or web application, watch Rails videos everyday, and learn a different Ruby construct every other day.
on 2009-03-24 03:25
I would highly recommend "ruby for rails" as a starter book followed by "The Rails Way" for Rails 2.0 as an excellent definitive source on most topics. -gs On Mar 21, 5:12 pm, Power One <rails-mailing-l...@andreas-s.net>
on 2009-03-24 08:06
All advices are really awesome so far! Thank you guys. With your suggestions, I have so far immerse myself into RoR a bit more, messing around with scaffold, and it was an eye opener. Man, scaffold is really making things go fast as if I'm on a super fast jet. LOL. I know scaffold is just a bait, because if I want to have a more specific features and so on, I have to add extra ruby codes to what scaffold already has generated. Though, scaffold has created CRUD application in its basic form is already too amazing. All I did was calling "scripts/generate scaffold feature column_name:column_type", then do rake db:migrate, and then if I want to change or add anything to db, I only have to do script/generate migration Add..To..(name convention) then rake db:migrate again. As now I knew MVC structure better, I think I could using scaffold (for fun) to create something basic for the web in few minutes. LOL. To pretty up the presentation, I could always add css to the views. RoR is awesome.