Previous Entry Share Next Entry
I have an application that does require 'sqlite3'. This works if you've installed the sqlite3 package directly. If you instead install it via gem install sqlite3-ruby, it installs into a subdirectory and the require fails; you have to require 'rubygems' first. But that fails to run if you don't have RubyGems installed.

Is there a standard way to make this work? Or should I just prefix all my programs with
begin require 'rubygems' except Exception; end

Within a library that uses sqlite, should it also do the same trick? Or should it require that the caller has done this?