push 'gem install' into lib folder, with _api.so


Suppose I have a shell account, without root permission, on a Rails-enabled hosting site.

Now suppose the sysadmin didn't include sqlite3, for example, and I want to crow-bar it into my own site. (Yes, switching to MySQL, the way the Lamp Gods intended, is next!)

Can I use gem install sqlite3 --install-dir lib ?

I tried that, and the system can't find the gem. So I add the gem's raw path to environment.rb:

$:.unshift File.join(File.dirname(__FILE__), '../lib/gems/sqlite3-ruby-')

Now the system can find the sqlite3.rb, but not sqlite3_api.so. I toss that into ~/bin, which is on the preexisting PATH, and it still doesn't work. At a guess, I am within one symlink of getting this, but what is it?? It ain't "ln -s ~/bin/sqlite3_api.so ~/bin/sqlite3.so"....

(BTW it's _why's sqlite3, from gem install sqlite3-ruby --source code.whytheluckystiff.net , natch!)