On Friday, December 7, 2012 5:14:04 PM UTC-8, Keith Bennett wrote: > Hi, all. I just started using sequel today, and it is awesome! Some > questions... > > > *Oracle Driver? > * > I don't have an Oracle data base available to test, but will be teaching > someone Ruby who will have an Oracle data base he wants to access using > Sequel. > > Will he need to install any additional gems, like ruby-oci8? I'm hoping > not, because I just tried, and had ruby-oci8's native extension fail to > build on both MacOS and Linux. >
With regular ruby, you would need to install ruby-oci8. I think this requires you have the necessary Oracle headers and libraries installed on your systems, though. > *JDBC in JRuby* > > Also, I'd like to be able to use Sequel in both MRI Ruby and JRuby. For > JRuby, will I be able to use the standard (that is, not JDBC) drivers? > Even if so, I would like to know how to use the JDBC driver. It looks from > the documentation at > http://sequel.rubyforge.org/rdoc/classes/Sequel/Database.html that JDBC > is used like the other drivers, but I can't find out how/where the JDBC > driver class is specified. From a brief inspection of the code, it looks > like SQLite, MySQL, and Postgres are supported out of the box, and I might > not need to tell Sequel anything about the driver class. But what will I > need to do for Oracle? > In most cases on JRuby, you will have to use the JDBC drivers with the jdbc adapter. The postgres adapter does work on JRuby using the postgres-pr ruby library (and maybe the new jruby-pg library, but I haven't tested that yet), but that's the only exception I'm aware of. You just pass the JDBC connection URL to Sequel.connect and it just works. You do have to have the necessary oracle JDBC driver jar in your java classpath and require it before calling Sequel.connect, though. Also, links to any resources (blog articles, screencasts, slideshows, etc.) > about using Sequel with JDBC and/or Oracle would be greatly appreciated. There aren't any significant differences compared to other uses of Sequel, so hopefully you won't need another resource. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/txUtd-3kEJsJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
