3 Weeks in Rails (October 29, 2008)

Posted by Gregg Pollack October 29, 2008 @ 09:16 PM

It’s been 3 weeks (I know I’ve been slacking). However, it’s time to write out another summary of information that any Rails developer might want to know about. Detailed audio versions of these notes can be found on the Rails Envy Podcast #51, #52, and #53.

You may already be aware that Rails 2.2 RC1 was released last Friday. For a glimpse at the new features you can read through the Release Notes. However, if you’re looking for something more comprehensive check out the Envycast on Ruby on Rails 2.2^ or the What’s New PDF by Carlos Brando.

Rails 2.0.5 and Rails 2.1.2 were also pushed in the last few weeks, mostly just plugging up a few small security concerns. If you’re on 2.x, you should probably take the time to upgrade.

If you’re taking advantage of the localization features of Rails 2.2, there are two libraries you should probably be aware of. First, Diego Carrion recently created a fork of restful_authentication where he added full support for i18n. Secondly, Karel Minarik recently released a plugin for doing localized_country_select so you can display countries the appropriate language.

If you need your Rails application to receive emails, one way to do it is to use gmail IMAP. John Nunemaker wrote up a nice walkthrough showing all the scripts need to parse email out of gmail.

Hosting, Performance, and Tuning

With Rails 2.2 thread safety, you might assume that brings a performance boost for everyone. However, this is not always the case and Pratik Naik explains why.

Ilya Grigorik wrote a blog post about Scaling Rails with MYSQL Plus where he uses the Non-Blocking MySQL driver from Neverblock to get some increased performance out of ActiveRecord which is quite impressive.

If you need to implement full text search in your Rails application, and you are already thinking Sphinx, you may want to check out the Thinking Sphinx PDF by Pat Allan over on Peepcode.

Library News

If you’re a fan of resource_controller (skinny REST controllers) and Shoulda you shoulda definitely check out the starter app by James Golick called Blank.

The next time you need to build a “Software As A Service” website (like basecamp), check out Service Merchant. This gem sits on top of Active Merchant and gives you everything you need to do Subscription Billing.

Do you ever forget your Rails routes? There’s always the “rake routes” command, but that’s not very user friendly. You might want to check out Vasco. Vasco is a Route explorer for Rails which provides a nice web interface to browse through and test all your Rails routes.

If you ever need to build a Rails application which is accessible on multiple domains or multiple paths (like foo.com or bar.com or a.com/foo) then take a look at the Rails Proxy Plugin by Sean Huber. This plugin allows you to dynamically respond to proxied requests by detecting the incoming path and properly setting the session domain, default host, and relative url root.

If you need an easy way to test your plugin which extends ActiveRecord, check out acts_as_fu, which aside from it’s unfortunate name, is pretty slick.

If you came over from PHP, you’re probably familiar with phpMyAdmin. One of the Rails Rumble teams made a Ruby version of phpMyAdmin that’s definitely worth checking out if you’re missing a quick web interface to your db.

Event News

The Rails Rumble is over and you only have 3 more days to vote (voting closes on Midnight November 1st). Cast your vote! It’s good practice for next Tuesday (least in the US).

If you’re over in London, Ruby Manor is taking place November 22nd. Looks like it’s going to be a fun unconference type of event.

Lastly, Rubyconf is next week here in Orlando, Florida where it’s been kinda chilly lately. Definitely pack something warm just in case, and see you next week!

Image Credit: Blue Sky on Rails by ecstaticist, Analog Solutions 606 Mod by Formication, RailsConf Europe 2006 by Paul Watson, Rainbow by One Good Bumblebee
^ In the interest of full disclosure, I do produce Envycasts, and profit from the sale of the screencasts.

Posted in General | 37 comments

Comments

  1. Red Leader on 29 Oct 22:46:

    I’m tempted to buy your stupid screencast, just so I can be the first to put it on Pirate Bay.

    Problem is I don’t think anyone could be bothered downloading it.

  2. Gregg Pollack on 30 Oct 00:34:

    Ouch.. It’s not like I’m making a ton of money off the screencast.

    I enjoy putting together educational video, and unfortunately I’m not in a position where I can afford to do it for free. I have a wife and kids to feed.

    However, I would like to think that $9 is cheap enough that it’s accessible to just about anyone.

    I know I’m the type of person who would rather watch a video then read through changlogs (which you can, for free), so for other people like me… I would hope people would appreciate the work I do.

  3. David R on 30 Oct 00:47:

    gregg, its not it’s (unfortunate grammar). you don’t read svn? http://www.37signals.com/svn/posts/1302-its-not-its

  4. MikeInAZ on 30 Oct 01:14:

    Come on Gregg, I know you just bought a new Gulfstream jet. I think you should disclose that.

  5. sino on 30 Oct 01:37:

    I don’t think it was very cool to sell the release notes pdf for the 2.2 update, especially since its going to be released open source anyway in a couple of days. It makes me think rails is related to snake oil

  6. Gregg Pollack on 30 Oct 02:00:

    Mike: LOL

    sino: You may want to re-read that paragraph. The release notes are free.

  7. Kevin Triplett on 30 Oct 05:24:

    Red: I can attest that it takes a surprising amount of time and attention to create videos and Greg’s videos have helped many people learn cool new skills with which they can make money, so lets give him a break and throw him some beer money (oh, he’s married…food money:).

  8. Erik Dahlstrand on 30 Oct 07:09:

    When it comes to I18N the following plugins are really usefull:

    translatable_columns and i18n_label by iain (http://iain.nl/).

    localized_dates by clemens (http://www.railway.at/).

  9. iGEL on 30 Oct 08:58:

    I know, it takes lot’s of effort to write such a document and to some extend I understand, that some want get something back.

    But I think it’s sad, more and more of the rails documentation is only available for money. It’s probably the downside of rails having such a leet MacOs/Textmate community. I don’t know any other language or framework with such a high share of sold online documentation.

  10. Rafael on 30 Oct 10:35:

    Hi folks,

    I wonder, how many of you guys, who are bitching around about that work is not for free, have already contributed only one thing to the community.

    I guess most of you even not contributed a single line of code.

    If you want to work 14h a day, while contributing to something like rails or knowledge management, education,... without getting anything back… do it… I cannot understand this position.

    I personally apreciate all of your efforts (Greg, Ryan, Dave Thomas, Geoffry G.) and I am glad, that you all make that useful work. I learn so good with all the screencasts/ docs / tutorials.

    I even appreciate the selfless knowledge transfer, so we all can do good applications.

    I really wonder, why should this be free? I don’t know why people always want everything for free and sell it themselves expensive. When something isn’t worth some bugs… ...your work isn’t either sorry!

    Look into other frameworks / languages, there ISN’T anything, which you could compare. Even API’s are so clean and good. PHP, Python, Objective C, Java (quite good) hasn’t that valuable material which helps you get started or even get more experienced.

    I like the way you all do it. And when you cannot afford it to learn it by yourself and spend a little money, I am very sorry for you guys.

    Please keep on doing this fantastic work, I encourage you to go a little deeper in advance stuff, like metaprogramming / programming plugins / heavy AJAX usecases and don’t repeat always beginner stuff. Thats what I would wish, if I could.

    Best regards

  11. Gregg Pollack on 30 Oct 13:29:

    Thanks for the kind words guys.

    iGEL: do you know about the Rails Guides project? It’s pretty awesome free documentation that comes along with Rails. Search for it in the free release notes.

    There’s also the Rails documentation project which has been merged in with Rails 2.2, so this version has increasingly detailed comments.

    There’s also apidock.com which gives you the ability to quickly search the documentation AND leave comments.

    Lots of great new FREE documentation.

  12. Still A Fan Boy on 30 Oct 15:07:

    Hmm..

    I understand the need to be adequately compensated for ones work, but the FOSS philosophy seems to no longer apply to documentation in this community. Even the blog essays appear to be shrinking in numbers.

    Most FOSS documentation attempts, even the Rails Guides, still don’t compare to the likes of Django’s docs. Thank God Ryan Bates hasn’t gone the Peepcast route yet.

    (note: It also ‘appears’ to be a conflict of interest blogging for the Rails Core and also self promoting product.)

    This is NOT A SLAM! Strong marketing through educational blogging was key to building Rails momentum and the community. I worry that the closed nature of most new documentation will start braking some of that momentum.

  13. Michael Johann on 30 Oct 15:09:

    iGel: Upgrade to Rails 2.2 and run:

    rake doc:guides

    That will make you happy.

    Gregg: Go on and produce many more of this high quality videos for this less pricing.

    BTW: Did I mention, that I thanked you in my book “Ruby on Rails für JEE-Experten” (german language book), that is…ouch, also not FREE. ;-)

  14. Gregg Pollack on 30 Oct 15:36:

    Fan Boy: I understand what you’re saying about FOSS Documentation, and I see your point. I feel like Rails Guides and the Documentation Branch were two huge improvements with Rails documentation that should not be overlooked.

    I suspect it’s the natural evolution of any popularized OS web framework to have some content which is free, and some which is paid for. There is an increasing number of great books on Rails. There’s also some great Peepcode’s on Rails (one of which I also mentioned in my post).

    Hopefully there is some balance between free and paid.

    Unfortunately the time it takes me to create my content prevents me from releasing it for free. However, if someone wants to pay me to create free content, I’d be totally game.

    I’m sure some of the 37 Signals guys are on salary when they work on Rails. Engine Yard pays for some developers to spend time working on Rubinius and Merb development. Sun pays a few developers to work on JRuby.

    If someone would be willing to pay me to create free educational content/documentation for Rails, that’d be bad ass. hehe…

    Any takers?

  15. Ryan Bates on 30 Oct 18:31:

    Both Gregg and Geoffrey Grosenbach have put out a lot of free content for this community. Just look at their history. In my mind both deserve compensation for their efforts, and I’m proud to support them.

    Trust me, their business model is not a get rich quick scheme. It is a way for them to produce higher quality content and afford to spend more time contributing to the community.

    Be glad they’ve done as much as they have, and please don’t discourage them.

  16. Jake on 30 Oct 22:08:

    I dont think anyone would argue that screencasts aren’t hard work, it’s just a conflict of interest promoting oneself on the official rails blog, that’s all.

  17. Gregg Pollack on 31 Oct 03:26:

    Jake: In my opinion this is what full disclosure is for, letting people know that you are talking about a product which you are profiting from (which I did).

    If you check other ruby/rails news sources (such as Ruby Inside) you’ll find the same technique is employed.

    If I would have said that “everyone needs to go buy the envycast right now” or written an entire article plugging the thing, then I can understand why you might object.

    Then again, this is just my opinion.

  18. Jake on 31 Oct 14:03:

    The difference between rubyinside and rubyonrails.com is, besides the fact that ruby inside is almost always down, that this is the official and rubyinside is a fan site.

  19. karmi on 31 Oct 19:52:

    Madre Mia! Stop crying that some content which you have to pay for is promoted by a single link. So what?

    It’s still a content you can use to learn something. Books are written and sold, workshops given for a fee. Both are promoted. So what?

    There’s so much free education material (eg. Confreaks videos) for Ruby/Rails available on the web, that it’s really hard to see the argument here…

  20. paulc on 01 Nov 00:54:

    I agree there is a huge difference between rubyinside and rubyonrails.com . rubyinside is a fat site, that stuff is expected. This is the official rails site, its not expected to hawk stuff on here.

  21. Gregg Pollack on 01 Nov 03:52:

    If anyone thinks I crossed a line by hawking commercial products on this blog, you may want to take a look through the archives. What you’ll find is people promoting many commercial ventures such as conferences and books.

    Then take a good look at the left column where you’ll see the 37 Signals Job Board.

    I’ll leave it at that.

  22. Eddie on 01 Nov 20:55:

    Storm in a proverbial if you ask me. Keep on keeping on Gregg, no real conflict of interest here in my opinion.

  23. Koz on 01 Nov 21:04:

    Guys,

    Gregg does great work for us here, and his products are top notch. If every post here was nothing but links to his stuff, we’d have a problem. They’re not, and we don’t have a problem.

    Let’s take some of the time you took to post angry comments on this post, and invest it in contributing to improved rails guides. There’s a lighthouse project and everything.

  24. Koz on 01 Nov 21:10:

    Also, if you’re going to go around saying nasty things about people, at least have the courage to use your real name.

    Then you’ll be able to point at all the different ways you’ve helped out and use it to bolster your point.

    You have helped out right?

  25. Hongli on 01 Nov 21:18:

    Gregg, Geoffrey, don’t be discouraged by the trolls. You guys are doing some great work here. I know that creating screencasts is hard work. It’s totally reasonable to be compensated for that work. I’ve even bought a few screencasts in the past – good job!

    It’s exactly as koz said. There’s no problem as long as the site’s not filled with advertisements. The people who are complaining that not everything is free should either contribute documentation, or remain silent.

  26. DHH on 01 Nov 23:09:

    Totally agree with Koz. Gregg, I hereby grant you permission to hawk your stuff however and whenever you see fit here. If Jake, or anyone else, has a problem with that, they can locate the unsubscribe button in their RSS reader.

  27. Arthur Mai on 02 Nov 14:51:

    Hi folks,

    I don`t understand why everyone wants all for free. I agree absolutly with Rafael.

  28. Still a Fan Boy on 03 Nov 18:47:

    So much for journalistic credibility.

    DHH has now made it official. Weblog.rubyonrails.com is now the place to come for your ‘edublogommercial’ cravings!

  29. Peter Cooper on 03 Nov 21:11:

    Jake said: besides the fact that ruby inside is almost always down

    You might want to investigate with your ISP. Ruby Inside has not experienced any significant outages since 2006. Alternatively, you may occasionally be using an IP in a block banned from the site – although there are only a few of those.

    Paulc said: rubyinside is a fat site

    You mean phat, right? ;-)

    Anyway, to those complaining about the “commercial” content, you need to realize that there are many people who do Rails as a job.. not just as a hobby on the weekends after a week programming in Java for the DOD.

    It’s okay for you to think that Ruby and Rails are just hobbyist endeavors, but for many people they are not. They’re livelihoods as well as hobbies.

    If you want to continue complaining, I would love to hear from you when you’ve launched your free, continuously updated, commercial-free high quality screencast series or the like – you’ll definitely get a link from me. Until then, button it.

  30. Elise on 04 Nov 06:18:

    “If Jake, or anyone else, has a problem with that, they can locate the Locate the unsubscribe button.” – DHH

    “Until then, Button it!” – Peter Cooper

    I’m very disappointed in these responses from the so called ‘pundits’.

    Yes, Rails does need to build its economic base for long term success, but there needs to balanced and sober presentation of information regarding the ‘Core’ of Rails on the ‘Core’ blog.

  31. DHH on 04 Nov 16:49:

    This isn’t a blog aiming to be great journalism. It’s a pointer for things the people who write the blog find interesting.

    And as though this is something new. Look back through the archives. I’ve hawked every new 37signals application on these pages since the beginning of the blog :)

    Just becomes something is open source doesn’t mean that it has to be non-profit too.

  32. Rafael on 05 Nov 19:28:

    what a waste of energy, answering those sissi complaints,... but anyway… I cannot resist ;-)

    ...I would say… between being a greedy, evil capitalist and someone who earn the money for living is a BIG difference…. I really get angry and sad by such backboneless close-minded thinking.

    It really makes me sad, that those people even don’t see that such great speeches could discourage the people or steel our time, even in defending a honest motivation.

    I am so grateful, that I can use Rails and I am everytime so excited about every release! But anyway… I wouldn’t have get into it soo fast, when I wouldn’t have such great learning stuff!

    Me personally, I prefer having a loooot more of those screencasts, and I love to pay for it :-))) From, I would say over 20 SC I bought, there were some, which I could had have leaven out. (but my addiction causes high CC bills :-D)

    Little sidekick :-D What I really recommend too, are the screencasts from Dave Thomas on Pragmatic, its about metaprogramming. For me, the first time, someone clears out some of the magic things of ruby and may it help me soon to contribute a little bit to rails.

    Check it out!

    It helped me sooo much and I am so awaiting for other advanced topics. Its a great way for learning.

    thanks folx

  33. Doubtful on 06 Nov 20:13:

    Rafael = Hired Troll.

  34. Rafael Schär on 07 Nov 23:08:

    No I am not, hehe But thank you anyway, that, speaking my mind or my opinion should have been hired, just funny :-D In comparison to other people, at least I dont have to hide my name. To make this clear, it only my real opinion, nothing more. Take it or leave it.

  35. Rocco Briggs on 12 Nov 22:25:

    wg4jnke5ceo0xgxx

  36. Cathrine Contreras on 12 Nov 23:46:

    5bug1chjsa2glb1m

  37. Shana Simpson on 13 Nov 00:06:

    2zudb7yp0wj4ewa2