After nearly 2 years, thousands of commits, and with the help of 1600 developers it is done. Today Rails 3.0 has been released. Rails 3.0 not only has plenty of new and useful features, it also has been rewritten from the ground and is the basis of all future development. “Convention over Configuration” is still the principle, but with the addition of modularity. Assemble your own Rails stack without any restrictions. Most of Rails functionality can be replaced with other components. No more hacking/monkey patching to use Mongrel, CouchDb, Datamapper, Redis, Haml or some other hot technology.
Thanks to all Rails committers and the awesome community (nearly all plugins are already Rails 3 compatible). Technology predictions tend to
be wrong, but I think in this case it is easy to say Rails 3 will be a huge success.
A few links to get you started:
Lingui.st - Online Resource Editor, Manage your Ruby/Rails, Java, .Net and C++ language files with ease
Sending emails is an essential part of every web application. Setting up an email server isn’t to difficult, getting the emails to recipient without getting marked as “spam” is. Using Sendgrid solves both problems for you and offers other features too. However, I don’t care much for a rich feature set, for me it is important that the emails are getting out and don’t land in a spam folder. Sendgrid helps me achieve that at a reasonable price.
Get started in Rails: Put
in your environment file (e.g. config/environments/development.rb). That’s it! So join all the new entrepreneur hotties and send your emails with Sendgrid.
Lingui.st - Online Resource Editor, Manage your Ruby/Rails, Java, .Net and C++ language files with ease
Like I mentioned in my last article, I currently use Redis/Resque quite a bit. The installation of Redis isn’t really a challenge and Resque isn’t more than a requirement in the Gemfile. However, I often forget that when I start a Resque worker, it doesn’t have access to the Environment/Lib files per default. A “class not found” exception is the typical indicator.
When you are working with Rails, the Rake task “resque:setup” seems the right place to require everything necessary. Just create a new File named “resque.rake” under the folder “lib/tasks“. Rails loads .rake files automatically from this folder. Next, put the following in the file:
It extends the “resque:setup” task, so that the Rails environment and also all Ruby files from the folder “lib/hemju/jobs” are required on the setup. When you are creating a new Resque Job, just put it under the /lib/hemju/jobs folder and the Worker has access to. Don’t forget to restart the worker.
Lingui.st - Online Resource Editor, Manage your Ruby/Rails, Java, .Net and C++ language files with ease
I have been using Redis/Resque for some time now. Recently, I needed a Rake task to quit all running Resque workers for deploying an application via Continuous Integration using Hudson builds.
Here is with what I came up with:
Just place it in a rake file under the “lib/tasks” directory and you are good to go. If you are running “rake -T” from your Rails root you should see the task.
Lingui.st - Online Resource Editor, Manage your Ruby/Rails, Java, .Net and C++ language files with ease
No I am not at the RailsConf, but unless other conferences, it is possible to follow presentations pretty closely (almost live). So here a little summary of what I gathered from digging through presentations pdfs, watching keynotes, and following tweets:
Rails 3 is finished (nearly)
In his keynote DHH said Rails 3 is finished. With finished he means it is ready to use in real live apps and feature complete (? I am not sure about this one). 37Signals already uses Rails 3 in some small products and they are currently porting all their major apps to version 3. Currently a Rails 3 Beta 4 is out and a RC is coming in a couple of days. Get Ready for Rails 3.0.
Rails 3.1 outlook
One of the most exciting things for me was a glimpse to a possible Rails 3.1. Of course there isn’t any code yet, however, the Rails members already have some ideas in mind. One of them is to provide better support for CSS and Javascript (JS). Currently both are treated as static resources. With techniques like CSS Sprites and more and more Javascript development going on, CSS/JS are already a vital part of every web applications and not just static resources anymore. I would love to see Rails 3.1 helping me managing my JS files and creating CSS Sprites. Often JS logic is very specific to a page, wouldn’t it be great to write JS code directly in the page and later it is extracted/compiled to one application.js file?
NoSQL
I have been playing around with NoSQL lately (especially MongoDB) and wow! The performance of NoSQL is just astonishing. I also like the document approach to structure the applications data, it feels more natural than normalizing the data. So if performance of the data layer is crucial, NoSQL is the way to go. NoSQL got also a lot of love in the presentations and I am sure that we will see a lot more in the future. That said, I am spoiled by ActiveRecord (especially in Rails 3.0), so for now I stick to traditional databases.
(No)JRuby
Charles and the JRuby team are the RailsConf and they do a great job of advertising JRuby (just see Charles tweet stream). However, I expected at least one JRuby presentation not by the core members. It still seems that the community doesn’t use JRuby much. My guess the Java love/hate of Ruby developers is responsible for the hard time of JRuby. That’s not just unfair, it is also stupid. JRuby uses that part that makes Java awesome (I still like Java), the JVM. The JVM is a great and well tested platform, and with new Ruby performance discussions (Part 1, Part 2) rising, it is maybe time to realize that JRuby is a very viable solution for production.
Not much HTML5 and no (real) surprises
Of course every good conference must have a surprise announcement (ok in case of Google I/O, they would have better skipped the Google TV presentation). Sadly RailsConf didn’t care about the surprise rule (maybe it is just a guideline?
). HTML5 is currently the hottest topic and so I expected some kind of surprise in this direction. Maybe a Rails integrated offline store, a Rails game engine based on the canvas element, or a Rails background worker. My guess, we will see this in 2011.
Of course the last part is just my way of saying, I wish I am at RailsConf and RailsConf without me isn’t as good as it could be. There is only one thing left to say:
Thanks to all Rails developers and the community to make Rails better and better.
Lingui.st - Online Resource Editor, Manage your Ruby/Rails, Java, .Net and C++ language files with ease