New 15-minute blog video on Rails 2.2

The old 15-minute blog video was getting really long in the tooth, so it’s with great pleasure that I can present the new video made with Rails 2.2 and done by Ryan Bates. It really takes it all up a notch by showing the creation of a blog with comments, ajax, feed, api, admin interface, and more.

Ryan Bates is also the author of the wonderful Railscasts.com site that features video explanations on Rails features. It’s a fantastic resource and now properly recognized on the screencasting page.

I’ve also linked up the commercial Rails screencasters. The amount of material available for people interested in learning by video is simply staggering.

Posted in Documentation  | 35 comments

New Rails 2.2 i18n defaults

I just reduced the housework needed to setup a new Rails application with i18n. All new applications will ship with a config/locales directory that’s automatically wired up in the load path for i18n. So you can just drop .yml or .rb locale files in there and they’ll be instantly available for translation.

There’s also a sample config/locales/en.yml file in there to give you a starting point. In addition, the initializer is now wired up through the Rails config. The new default environment.rb provides these pointers:

# The internationalization framework can be changed 
# to have another default locale (standard is :en) or more load paths.
# All files from config/locales/*.rb,yml are added automatically.
# config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de

So on a fresh Rails 2.2 application, you’ll be able to do see it all wired up out of the box (the :hello key is from the config/locales/en.yml demo file):

$ ./script/console
>> I18n.t :hello
=> "Hello world"

Rails 2.2 final is just around the corner. We’ve been ironing out the last bugs and added the last amount of polish to make this a kick ass release. Also, work on 2.3 / 3.0 has already begun in master as well since we’ve branched for 2.2 a while back.

Posted in Documentation  | 37 comments

Rails Guides Wants You

If you haven’t looked at the state of Rails documentation lately, it’s time to look again. The new Ruby on Rails Guides page includes 14 separate guides for Rails developers, with topics ranging from “Getting Started” to routing, security, testing, and debugging. That’s over 70,000 words of help content for Rails users that didn’t exist two months ago when we launched the Rails Guides project.

But we’re not done yet! We’re starting phase 2 of the Guides project, and planning a fresh batch of content to add to what’s already there. Our goal is to have a single page where you can find all of the information you need to be an effective Rails developer. Remember, though: this is open source. That means we want your help too!

Here’s what you can do to get involved:

  • Read about the process of and rewards for contributing on the Hackfest page.
  • Check the list of available tickets in our Lighthouse project, and sign up to write a guide.
  • Submit corrections, suggestion, bugs, or patches for the existing guides. You’ll find a link to the relevant Lighthouse ticket at the bottom of each guide.
  • Let us know what other guides you think should be added – whether you want to write them, or just hope that someone else will. Just leave a note in the comments here and we’ll get your idea into the process.

You’ll usually find some of the documentation team hanging around in #docrails on IRC. Come join us and help the community!

Posted in Documentation  | 17 comments

Step by step guide to contributing code to Rails

Always wanted to bask in the glory of being a Rails contributor? Mike Gunderloy has compiled a 12-step program to get you there from square. It’s never to late to get started. According to some calculations, we’ve already had some 1,400 different people contribute.

Posted in Documentation  | 2 comments

Sven Fuchs explains the history and detail of I18n in Rails 2.2

Sven Fuchs gave a great presentation at RailsConf Europe about the history and details of the forth-coming I18n support in Rails 2.2. Well worth reading if you’re in need of internationalization services for your current or future app.

Posted in Documentation  | 7 comments

Guides Hackfest

I’m pleased to finally announce the Rails Guides Hackfests. And we got really exciting prizes too! There is a list of guides available at Lighthouse You can select one of those, update the ticket and start writing the guide straight away.

For each completed guide, the author will receive all of the following prizes :

You can find more details at http://hackfest.rubyonrails.org/guide

Special thanks to GitHub, Newrelic & Caboose documentation project for making the hackfest a lot more exciting!

Posted in Documentation  | 4 comments

Free Rails 2.1 Book

If you’re eager to learn how to use all the new features in Rails 2.1, Carlos Brando just released a free book titled Ruby on Rails 2.1, What’s New?. You can download the PDF in its original Portuguese, or its very recent English translation. This 120 page book covers everything you need to know about Rails 2.1 with many step by step examples.

You might also know Carlos Brando from the Ruby on Rails Podcast Brazil he does with Fabio Akita. If you’re a Rails developer and you speak Portuguese, definitely check out their podcast.

Posted in Documentation  | 8 comments

Guide to creating and testing patches with Git

Michael has written up a guide on how to create and test patches with Git. A good read for anyone interested in contributing or following the development of Rails.

Posted in Documentation  | 14 comments

Help improve Rails documentation on Git branch

Pratik’s documentation branch for Rails has moved to http://github.com/lifo/docrails. This branch is open for all to contribute to directly. Just send Pratik a note on Github asking for access and it shall be granted. There’s even a page for the conventions used on the branch.

This makes it easier than ever to help improve the documentation for Rails and harder than ever to just sit back and whine about it. Make something great!

Posted in Documentation  | 13 comments

Agile Web Development with Rails, 3rd Edition

You asked for, heck, you demanded it, and now it’s becoming a reality. The original Rails book, Agile Web Development with Rails, is getting a facelift and the 3rd edition is now available as a beta book.

The book will be targeting Rails 2 and thus cover the many improvements in features and idioms that Rails have seen since the last edition of the book.

We also have a new author on board with the project: Sam Ruby. Sam co-authored the wonderful RESTful Web Services and have been involved with the Ruby and Rails communities for quite some time now. It’s fantastic to have him involved with the book.

Posted in Documentation  | 33 comments

How time zone support will work in Rails 2.1

Geoff Buesing has writing a great guide to the time zone support in Rails 2.1. It goes through all the new features including how to setup per-user time zone support and more. Really good stuff. Geoff’s work will remove a lot of pain for a lot of people. Three cheers to his hard work.

Posted in Documentation  | 12 comments

Passenger (mod_rails for Apache) launches

The guys at Phusion has finally wrapped up Passenger, their mod_rails-like module for Apache. It’s looking like a great, easy solution for people who want a more PHP-like deployment story. Just dump your files in a directory setup with a vhost and off you go. Touch tmp/restart.txt and the application is restarted. Doesn’t get much simpler than that.

Posted in Documentation, Launches  | 40 comments

A taste of what's coming in Rails 2.1

Rails 2.1 is not far off the horizon and we’ve been adding a ton of extra deliciously nice goodies in preparation of its release lately. As always, the good Ryan Daigle has been keeping a watchful eye on the changelog and has been documenting some of the new features. The latest stars are:

Posted in Documentation  | 15 comments

The Rails Way and Advanced Rails Recipes

The flow of new Rails books seems unstoppable these days and it’s hard to keep up with all of the new releases. But there are two books that I’ve recently have had a chance to taste that I’d like to highlight.

The first is The Rails Way by Obie Fernandez, which I wrote the foreword for. It’s a big whooper of a book (900+ pages!), but also a very comprehensive walk-through for the Rails developer who already has his feet wet. It also includes a good dose of community commentary on the how’s and why’s, which I rather like.

The second is Mike Clark’s Advanced Rails Recipes, which is still not finished, but there’s a beta book available. It takes up from Chad Fowler’s original Rails Recipes book and gives you another 72 how-tos on more in-depth topics, such as REST, deployment, and testing. I’ve had a chance to taste a few of the recipes already and it’s good stuff.

If there’s a new Rails book that you really like, write a note in the comments and point people to it.

Posted in Documentation  | 14 comments

Trouble installing new gems? (Part II)

A number of users have reported problems installing the latest Rails gems, especially on Windows. The solution is to upgrade RubyGems to version 0.9.5 1.0.0 before upgrading. You can check your RubyGems version by:

gem --version

If 0.9.5 1.0.0 is not the answer, do (you may not need to prefix with sudo, on OS X you do, some ‘nix distributions too, but not Windows):

sudo gem update --system

Then do:

sudo gem install rails

And while this should no longer be an issue, you can always install Rails from the Rails gem repository if the official one is having issues for whatever reason (such as right after a new release where the mirrors have some times not caught up and are spewing 404 errors):

sudo gem install rails --source http://gems.rubyonrails.org

If you want to use SQLite3 for a new application, first make sure that you have SQLite3 itself installed. If not, you can get it from the SQLite download page. Then make sure you have the Ruby bindings installed (the gem is called sqlite3-ruby). If you don’t, just:

sudo gem install sqlite3-ruby

If you don’t want to use SQLite3, that’s fine. Just do “rails -d mysql myapp” when creating your new application to get MySQL preconfigured. Or “rails -d postgresql myapp”. Or any other adapter you might want to use that you have installed, like Oracle, SQL Server, or what have you. The only thing we changed was which database adapter would be preconfigured if you didn’t explicitly set which to use.

UPDATE: RubyGems 1.0.0 is now out, which should fix the problems with Mongrel and Windows.

Posted in Documentation  | 66 comments