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  | 11 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  | 8 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  | 39 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

Give your Rails 2.0 application an iPhone UI

Multi-view development is a big deal in Rails 2.0. We’ve made it much simpler to allow the same action to serve many different formats. From HTML to XML to JSON to RSS and ATOM to CSV to whatever.

But did you know that you can use the same multi-view system to trout out different flavors of the same basic types? Say, give iPhone users a custom HTML interface while serving regular HTML users with the standard feast.

Slash Dot Dash teaches you how to do exactly that: Give a Rails 2.0 application an iPhone UI.

Posted in Documentation  | 5 comments

Learn more about Rails 2.0 through video

Railscasts.com is running a special series on what’s new in Rails 2.0. They’ve been showing off how to simplify views, how to usethe new foxy fixtures, and how to use HTTP authentication. All great stuff. And they’re promising there’s more to come. Keep it up.

Posted in Documentation  | 20 comments

Prototype 1.6.0 and script.aculo.us 1.8.0 released

New versions of the JavaScript libraries that ship with Rails, Prototype 1.6.0 and script.aculo.us 1.8.0, have been released. You can find out about the numerous changes on the Prototype blog and on mir.aculo.us. If you’re running Edge Rails, just svn up and run rake rails:update:javascripts to install the latest versions into your application automatically.

Also of note: Christophe Porteneuve’s Prototype & script.aculo.us book is now out of beta and available for purchase from the Pragmatic Programmers. It’s up-to-date with all of the new features in both libraries, so be sure to check it out if you’re using Prototype and script.aculo.us in your applications.

Posted in Documentation, Releases  | 12 comments

Free Rails PDF Book

Sitepoint is currently giving away free PDF copies of Patrick Lenz’s “Build Your Own Ruby on Rails Web Applications” book. Want a copy? Just head on over to http://rails.sitepoint.com and download it. This offer is only good for the next 60 days, so get while the gettin’ is good!

Posted in Documentation  | 18 comments

Summary of security articles and plugins

The QuarkRuby blog has created a great Ruby on Rails Security Guide that gives you a wealth of links to articles and plugins dealing with security in Rails applications. Everything fromn XSS to CSRF stuff is covered.

Posted in Documentation  | 4 comments

Noobkit

Looking for a good way to browse the Rails API documentation? Alex Gorbatchev has recently created Noobkit, a documentation browser for Rails, Ruby core, and over 20 other useful libraries. It also supports searching, comments (with your OpenID), and bookmarks.

Posted in Documentation  | 18 comments

Writing Google Maps Applications with Rails and Ajax

Andre Lewis is rolling out a duo of resources for those of you creating mashups and Google Maps-based applications.

Andre's book, Beginning Google Maps Applications with Rails and Ajax: from Novice to Professional will be available Feb 26 from Apress. The book covers the basics (getting a Google map up and running, interacting with the the Google maps API in JavaScript), as well as more advanced topics. For example, later chapters show you how to use RMagick to display hundreds of thousands of points on a map by generating custom map tiles, and how to create your own geocoder from US TIGER/Line census data. The book also touches on screen scaping and bulk data manipulation -- for example, processing large text files from the command line using Ruby, and the performance implications of a pure ActiveRecord database import vs MySqlImport.

Also related to mapping, Andre recently released GeoKit. GeoKit provides a bundle of tools to make maps-based applications easier:

  • Distance calculations in miles or kilometers: distance = first_location.distance_to(second_location, :units => :miles)
  • ActiveRecord distance-based finders: Store.find(:all, :origin=>[37.792,-122.393], :conditions=>'distance < 10')
  • . . . and directly from an address: Store.find_closest(:origin=>'100 Spear St, San Francisco, CA')
  • Geocoding from Google, Yahoo, Geocoder.us, and Geocoder.ca geocoding services. It provides a uniform response structure from all the geocoders, and also has a configurable fail-over mechanism in case one geocoder fails.
  • IP-based location lookup. Provide an IP address, and get a city name and latitude/longitude in return.

Andre's announcement on GeoKit is here. Bill Eisenhauer, the co-author of GeoKit, has also put up some live demos. GeoKit's home at RubyForge is http://geokit.rubyforge.org/.

Posted in Documentation, Sightings  | 13 comments