Python FTW!

some problems, solutions, and other stuff i've encountered as a web developer

Note to self: Add mysql bin dir to path

When installing mysql gem in Ruby 1.9.1 (using rvm), the process keeps on failing even when specifying --with-mysql-dir=/usr/local/mysql etc. Apparently the solution is to add the /usr/local/mysql to $PATH before issuing the gem install command.

Fail fast, fail open.

SWFUpload + Rails == Invalid Authenticity Token

http://github.com/lardawge/swfupload-rails-authentication

openssl, eventmachine, and the ruby 1.8.7 (and ree, too) bus error

Rails 3 is going to require at least Ruby 1.8.7 so I decided to install Ruby Enterprise Edition on my Mac. I have OSX Leopard (10.5.8) and use macports. After installing rvm, I encountered the same problem whenever I executed my web server in my Rails app:

/usr/local/rvm/ree-1.8.7-2009.10/lib/ruby/1.8/openssl/ssl.rb:31: [BUG] Bus Error
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0], MBARI 0x8770, Ruby Enterprise Edition 2009.10

The culprit is that I have two openssl installations and the eventmachine gem isn’t compiled with the same openssl as the my REE install. This issue was reported here.

So the solution is either to recompile REE to use Macport’s openssl or recompile eventmachine to use the system’s openssl lib. I chose to recompile REE.

sudo rvm install ree --configure --enable-shared=true,--with-openssl-dir=/opt/local --debug

Symbian development on Linux and OS X →

Adding Date And Time To Your Bash History →

export HISTTIMEFORMAT=”%h/%d - %H:%M:%S “

RailsAPI Textmate Bundle →

Textmate bundle for viewing Rails documentation (using railsapi.com).

Moved to Tumblr

I migrated my stuff from Slicehost to tumblr. I started by backing up the contents of my slice to my laptop using rsync:

rsync -e ssh -avl --delete --stats --progress user@timmedina.com:/home/user backup

After everything was backed up, I deleted my slice, bought a .net domain, and configured my tumblr account to use custom domain names.

I’m still thinking of a way to organize my website. I’ll probably learn to create custom themes.

And I have to add commenting, too.

Tumblenote! →

PL/Python cheatsheet with some tute links →