Addendum: mysql2 ruby gem and Mac OS X: image not found

Back at the start of April I wrote mysql2 ruby gem and Mac OS X: image not found to deal with the extremely relative path to libmysqlclient.16.dylib. I had said I would prefer not putting libmysqlclient.16.dylib in /usr/lib but I couldn’t find a dylib path that ruby uses. That is until today when I decided […]

mysql2 ruby gem and Mac OS X: image not found

If you are using the mysql2 ruby gem on Mac OS X you may have run into this problem before. > require 'mysql2' LoadError: dlopen(mysql2-0.2.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib Referenced from: mysql2-0.2.7/lib/mysql2/mysql2.bundle Reason: image not found – mysql2-0.2.7/lib/mysql2/mysql2.bundle So far the only solution I have found online is to use install_name_tool to update the […]

Store your git https passwords in your OS X Keychain

Around this time last year git added a "smart" HTTP transport that is faster than the old HTTP transport (and in some cases faster than SSH too). And a few months later GitHub added support for this new HTTP transport and made it the default selected url for repositories (that you aren’t a contributor for). […]

PhidgetSBC2 Interactive C# Shell

One cool package for playing around with your phidget(s) is mono-csharp-shell which gives you an interactive C# shell (with tab completion). apt-get install -y mono-csharp-shell Once the package is installed, you can open it with csharp but just like with gmcs we have to include the reference to the Phidget library. csharp -r:Phidget21.NET.dll

Missing Namespaces on PhidgetSBC2’s Mono

Since we cannot install mono-complete on the PhidgetSBC2 currently, we are missing some of the C# namespaces. If you are trying to use any of the following namespaces and gmcs cannot find it, you will have to install the respective package. Namespace Package Mono.Data libmono-data2.0-cil System.Data libmono-system-data2.0-cil System.Data.Linq libmono-system-data-linq2.0-cil System.DirectoryServices libmono-system-ldap2.0-cil System.Messaging libmono-system-messaging2.0-cil System.Runtime libmono-system-runtime2.0-cil […]

Simple Rails Multi-Tenancy

With some recent commits to rails comes the ability to have a default_scope with a lambda that gets evaluated at query time. Combine that with a multi-tenant column scoped database structure (wow, quite the mouthful) and you’ve got an quick and painless way to partition your tenant data without scattering code everywhere.

Playing with FormBuilder

The┬ámethods that come with the standard ActionPack::Helpers::FormBuilder cover most cases of what you need to do but if you need to do something it doesn’t have a method for, things can get a little ugly. In my case I wanted to create a helper for autocompleted fields that all had the same attributes but different […]