Wednesday, April 22, 2009

How to fix "no such file to load -- openssl" error with Ruby 1.9

If you get an error like this:

/usr/local/lib/ruby/1.9.1/net/https.rb:102:in `require': no such file to load -- openssl (LoadError)

while trying to install a gem or something similar, try this:

  • sudo apt-get install libopenssl-ruby1.9
  • sudo apt-get install libssl-dev
  • cd ~/Downloads/ruby-1.9.1-p0/ext/openssl (assuming you extracted the ruby tar to ~/Downloads)
  • ruby extconf.rb && make && sudo make install

Lame, but works.

Tuesday, March 24, 2009

Java Peristence API (JPA) for SimpleDB

Apparently, I forgot to mention one of my favorite open source projects on this blog, so here goes.

Want to migrate an existing java application to Amazon SimpleDB or just make working with SimpleDB as simple as possible? Check out the SimpleJPA project at It's quite full featured at this point and works great. We are using it in production code now.

Super Small, Super Fast Cache - Kitty Cache

I just put another caching library up at for an in memory cache that supports max size and expiry. Very lightweight.

Saturday, March 21, 2009

Gem Install Facebooker on Windows

If you run "gem install faceboooker", you'll get this:

C:\Users\treeder>gem install -f facebooker
Building native extensions. This could take a while...
ERROR: Error installing facebooker:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install -f facebooker
creating Makefile

'nmake' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/json-1.1.3 for
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/json-1.1.3/ext/json/ext/parser/

To fix this:
  1. gem install json -v 1.1.1 (only one that works on windows at time of posting, json_pure doesn't work with rails 2.3)
  2. gem install facebooker --ignore-depencies