GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
I'd like my code to be portable both on JRuby and MRI without the need to do the platform checks.
Here's the current output:
$ rbenv shell jruby-1.7.0-rc1
$ bundle exec ruby -e 'require "sequel"; Sequel.sqlite'
Sequel::AdapterNotFound: LoadError: no such file to load -- sqlite3
adapter_class at /Users/m/sequel_secure_password/vendor/bundler/gems/sequel-3.40.0/lib/sequel/database/connecting.rb:27
connect at /Users/m/sequel_secure_password/vendor/bundler/gems/sequel-3.40.0/lib/sequel/database/connecting.rb:67
connect at /Users/m/sequel_secure_password/vendor/bundler/gems/sequel-3.40.0/lib/sequel/core.rb:147
adapter_method at /Users/m/sequel_secure_password/vendor/bundler/gems/sequel-3.40.0/lib/sequel/core.rb:412
sqlite at /Users/m/sequel_secure_password/vendor/bundler/gems/sequel-3.40.0/lib/sequel/core.rb:419
(root) at -e:1
The adapter methods (e.g. Sequel.sqlite, Sequel.postgres) are for accessing specific adapters, not specific databases. Sequel.sqlite specifies using the sqlite adapter, which requires the sqlite3 gem. The jdbc/sqlite adapter operates differently from the sqlite adapter in some respects and I don't think that one should automatically be substituted for the other. Don't fear the conditional (i.e. use an if statement).
Ok, got your point. Thanks for fast reply :)