18
03
2010
Migrations are one of the best features of Rails. Although some folks prefer pure SQL rather than Rails migration DSL, I don’t know of anyone who dislikes the idea of a versioned schema that can evolve in a controlled and repeatable fashion.
But because the concept of database migrations is such a powerful one, it’s tempting to jam any old change that affects the database into a new migration and run rake db:migrate to make it happen. I’ve been guilty of a bit of this in the past, and I’ve joined some projects that did other ugly things in migrations. In the process I’ve learned the hard way that there are some things you must never do in a migration or they will come back to haunt you later. Here they are.
Read the rest of this entry »
Comments : 2 Comments »
Categories : Uncategorized, databases, ruby, ruby on rails
17
03
2010
Nokogiri on a standard installation of Leopard is complain-y about a couple of old libraries:
“HI. You’re using libxml2 version 2.6.16 which is over 4 years old and has plenty of bugs. We suggest that for maximum HTML/XML parsing pleasure, you upgrade your version of libxml2 and re-install nokogiri. If you like using libxml2 version 2.6.16, but don’t like this warning, please define the constant I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2 before requring nokogiri.”
Aaron Kalin figured out how to fix this if you’re installing nokogiri as a system gem, but I want to use Bundler and keep my system gems down to the bare minimum. I figured out how to do this under Bundler 0.8.5.
Read the rest of this entry »
Comments : 1 Comment »
Categories : Mac, Uncategorized, ruby, ruby on rails
16
03
2010
I’m trying out Ruby Version Manager this week, and my first impression is that this is some cool technology. But I wasn’t able to figure out how to get it to install an older version of REE to get around this bug (the “Marshal.load reentered at marshal_load” issue).
Igor P’s solution is correct (just install REE 1.8.7-2009.10), but it took a little fiddling to figure out how to get RVM to use the older version of REE. Here’s how to do it:
cd ~/.rvm/archives
wget -q http://rubyforge.org/frs/download.php/66162/ruby-enterprise-1.8.7-2009.10.tar.gz
rvm install ree-1.8.7-2009.10
Comments : 4 Comments »
Categories : ruby, testing
7
02
2010
Argh! I spent about 5 hours yesterday troubleshooting a failed Ubuntu Jaunty -> Karmic (9.04->9.10) upgrade. It worked fine until I rebooted and then failed to boot. Here’s how I fixed it.
Read the rest of this entry »
Comments : No Comments »
Categories : Linux, Ubuntu, servers
6
02
2010
Once again Ubuntu Linux proves itself to be easy to upgrade. Going from 9.04 to 9.10 (one release newer, since their numbering is bsaed on dates) was easy, but included the standard sprinkling of manual re-customization that I’ve come to expect from Debian based systems.
Read the rest of this entry »
Comments : No Comments »
Categories : Linux, Ubuntu, servers