Posts Tagged ‘rails 3.0pre’

Railsbridge BugMash on now

Saturday, January 16th, 2010

Railsbridge BugMash

The call went out the other day for participants in the Rails 3.0pre BugMash on Jan 16th – 17th. Included were some imple instructions for cloning Rails 3 and creating a new Rails app from it. So I pulled it down and gave Rails 3 a test spin.

Project

I decided to start a project for making a sort of universal friends list. One that encorporates XFN tags and OpenID. The data could then be used as a resource for other sites to seed a friends list. In order to claim an OpenID as your own you need to authenticate it.

Bundler

The first thing I noticed was the existance of the Gemfile in the rails root and how empty config/environment.rb is. I’d read on about the new bundler and thought it was going to be painful, but I was wrong, it was actually a joy. It even removed gem after I commented out the requirement statement in the Gemfile.

Plugins

I installed Authlogic as a plugin, after failing to get it working as a gem. I’ve had the same issue with Rails 2.3 so I don’t think this is an issue with Rails 3. The OpenId Authentication plugin worked fine as well.

Routes

The new routing module took a little getting used to, but after a few mistakes I got it working correctly. In the end config/routes.rb looks much cleaner, and still contains lots of commented samples. Also the legacy routing is commented by default, which is nice since that’s something I do anyway.

Premade .gitignore

Speaking of nice defaults, creating the rails app made .gitignore file for me with tmp / db / log already in it. Very Nice!

View validation

One thing that came as a bit of a surprise to me that the views are validated against the models. If you reference a field on the model in the view that does not exist, Rails will now error and tell you that it’s not there. So you need to rake db:migrate to have it recognize the fields on a model.

Conclusion

I have really liked what I see of Rails 3 thus far. Thanks to all those that have worked on it. I think that I will start using this version by default.