Steve Klabnik wrote a great article called Rails has Two Default Stacks. This is the best mental model I’ve found for the major factions within the rails community.

It breaks down if you start considering various deployment options, but I realized that it’s better not to. Deployment stacks can change more rapidly, and have more reasons for needing to change, than development stacks. It is worth just thinking about the development stack, of which testing is a major part. It is the development stack that plays the biggest role in programmer happiness.

If you work on a large project, thinking about just the development side of things will probably make your (Dev)Ops people happy, too.

George Carlin:

It looked pretty good. It was pristine. Paradise. Have you seen it lately? Have you taken a good look at it lately? It’s fucking embarrassing. Only a nation of unenlightened halfwits could have taken this beautiful place and turned it into what it is today: a shopping mall. A big fuckin’ shopping mall. You know that? That’s all you’ve got. That’s all you’ve got here folks. Mile after mile of mall after mall. Many, many malls. Major malls and mini malls. They put the mini malls in between the major malls. And in between the mini malls they put the mini marts. And in between the mini marts you got the car lots, gas stations, muffler shops, laundromats, cheap hotels, fast food joints, strip clubs, and dirty bookstores. America the beautiful: one big transcontinental commercial cesspool.

I started following Aaron Swartz back in 2005, when I was trying to learn all I could from Paul Graham. I read Graham’s essays and went to the first ever Startup School for Hackers. Aaron Swartz was there, having applied and been selected as one of the first participants in Y Combinator. I immediately found him intriguing and endearing, and started reading his blog.

Aaron Swartz is known for having a wide variety of interests, but they’re all connected. He wanted to make the world better through the power of openness. The first thing that he’s famous for is co-creating RSS, which is a tool that allows anyone to publish their thoughts, so they can easily be read by anyone with access to the Internet, with any tool that supports the standard. He used his blog, Raw Thought, to share his. I subscribed to it with my RSS reader, and also used a feed that Aaron created to read Paul Graham’s blog. Aaron created a tool called Infogami to enable others to share their thoughts. He became involved in reddit, which made the Internet more connected, even hyperconnected. These were great achievements, to be sure, but his sense of duty required him to do so much more.

His political activism was impressive, and will live on. Cory Doctorow’s post on Boing Boing is a good summary of it, but to understand where he was coming from, you need to read what he wrote and listen to what he said. His blog, which I expect will remain online, has a nice archive page. Read it.

Aaron, you have inspired me, and I’m going to miss you immensely. Thank you for your work to make the world a better place, and may you rest in peace.

Today I upgraded to rails 2.3.5 on a server that had an old version of Ubuntu. This is with an old version of ruby 1.9 that was installed using the Ubuntu packages rather than rvm. Here’s what I had to do:

1. Change the rails version

I changed the version in config/environment.rb to 2.3.15.

RAILS_GEM_VERSION = '2.3.15' unless defined? RAILS_GEM_VERSION

More information here.

2. Turn off yaml and symbol deserialization

Add this to config/environment.rb, just before the last end statement (at the end of the configuration block):

  ActiveSupport::CoreExtensions::Hash::Conversions::XML_PARSING.delete('symbol')
  ActiveSupport::CoreExtensions::Hash::Conversions::XML_PARSING.delete('yaml')

More information here. This is apparently also solved by the rails update above, but since this flaw is so harmful I’m glad to have it fixed in more than one place.

3. Require thread

I got this from a StackOverflow post. I added this to the top of config/boot.rb:

require 'thread'

# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb

It says not to change the file, but in this case I am not changing the file to customize my rails app but to make it work with a newer version. I’m not sure this step was necessary.

3. Upgrade rubygems

I had an old version of rubygems. It was installed with apt-get, so I couldn’t upgrade it with gem update --system. Furthermore, since I was running an old version of Ubuntu, apt-get upgrades weren’t working for me. So instead I uninstalled rubygems and installed it from source.

5. Install the gems

I installed the gems for rails with gem install rails --version 2.3.15 and also installed thin and mysql.

6. Restart the web server

Finally I restarted the web server.

Now, this is just one system configuration and chances are most are different so this may not help you. The uninstalling of rubygems and reinstallation from source took quite a while to figure out so I thought I’d share. If this doesn’t solve your problem, you may leave a comment and if I have time I’ll try to help you figure out what went wrong with yours.