Yes the gems will be required correctly through bundler.

You need to make sure your Gemfile calls the newly created gem with the
right require.

For example:
gem 'my_encapsulation_of_sqljdbc4', :require => 'sqljdbc4.jar'

Or you can take this jar require inside the main ruby of the gem.

I suggest you try your gem using an jirb session (you're using jruby,
aren't you?).

Like this with only 4 lines:

jirb> require 'bundler/setup'
jirb> Bundler.require # here you'll get a lot of info in irb mode. This
mode is similar to bundle exec
jirb> DB=Sequel.connect(...)
jirb> DB.tables

Until these 4 lines are working, your jar inside a gem is not packaged
correctly.

By the way, you should use jtds. Jeremy included patches so that clob are
transparent in Sequel, and this would allow you to distribute your gem.

On Mon, Jul 29, 2013 at 4:59 PM, cootcraig <[email protected]> wrote:

>
>
> On Monday, July 29, 2013 5:03:40 AM UTC-6, Christian MICHON wrote:
>
>> Hi,
>> - package sqljdbc4.jar into a gem, include this gem in your Gemfile, and
>> call sequel binary using 'bundle exec sequel -m ...'
>>
>
> Okay, this new gem will package sqljdbc4.jar and the jruby/java interface
> code needed,
> and I add the gem to my Gemfile.
>
> I'm not clear on how this new gem get's require'ed when I run this.
>
> bundle exec sequel -m db/migrate 'jdbc_connection_string'
>
> "sequel -m" will have required all the gems in the Gemfile.lock?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sequel-talk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Christian

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to