Long ago I realized that it’s often better not to quit a suspected bad idea, but to explore it and learn from it. @substack just gave me more insight into this:

Don’t unpublish your bad ideas. The best argument against a bad idea is to implement it well.

James Halliday (@substack)

The last sentence is key, and applies to more than published bad ideas. In web development, if it is indeed a bad idea, you’re more likely to learn from it, than to cause harm. If it’s a good idea that seems like it’s a bad idea, which turns out to be a good idea, it might be a really good idea.

There are a lot of rails 2.3.x apps that have slipped out of maintenance but are still used. When it comes time to add a feature to them, the original developer may be unavailable or may not have the same configuration for running it in development mode. I found myself in that situation and here’s what I did to run it:

  1. Start a new vagrant instance with Ubuntu. This makes things easy to install.
  2. Install rvm and the same ruby version. The project I received had a .rvmrc which specified a version of 1.8.7. The first time I told rvm to install the old version of ruby, I exited after rvm game me a list of packages to install, and installed those packages. Then I told rvm to install ruby again and it worked.
  3. Install the version of rails. It’s in config/environment.rb. Mine was 2.3.5. I ran “gem install rails -v 2.3.5”.
  4. Install dependencies specified in config/environment.rb. On this project it was just prawn, the pdf generator.
  5. Set up the database. This was the usual drill on this project. Nothing different from a new version of rails, except it was mysql instead of mysql2. I installed the Ubuntu database packages (libmysqlclient-devel and mysql-server), set up the database according to config/database.yml, and tried running rake db:migrate and after that failed ran rake db:schema:load.
  6. Go back to an old version of rubygems. I ran “gem update –system 1.5.3”
  7. Go back to an old version of rake. The breaking changes in rake were pretty much the worst thing ever. Switch to the global gemset and uninstall rake, and install rake again with “gem install rake –version=0.8.7”. If you’re having trouble with rake, 0.8.7 is probably the version you’ll want.

After that you’ll hopefully be able to run commands in script/ as well as rake commands.

In my experience it’s enough of a pain to go from 2.3.5 to 2.3.14 that it might be better to just go from 2.3.5 to the latest 3.x version. This will require a lot of changes but it will make the app ready to be worked on by most rails developers again.

Trans fats are harmful. Most people in the creative class know it and avoid trans fats. What, in my experience, fewer of us know is that it turns up in smaller quantities in food that says it has 0g of trans fats. That’s right. If food has less than 0.5g of trans fats, they’re allowed by the FDA to say that it has 0g of trans fats.

Normally this might be understandable, but trans fats are unhealthy in any quantity. So avoid them. This article by Vintage Savoire Faire says it best:

If a product contains hydrogenated or partially hydrogenated oils of any kind, it contains trans fats.  Don’t eat it.

Two brands that are accepted indulgences by many people who try to eat a healthy diet are Krispy Kreme and Snickers. These both contain hydrogenated oils, and therefore, small amounts of trans fats. Avoid!

But even if a particular product doesn’t have trans fats, do you really want to eat food from an industry that sneaks trans fats into their products? I don’t. I tend to buy a lot of produce, beans, oats, nuts, and seeds from Sprouts, Costco, and Whole Foods. It feels good to be buying real food instead of filth.