Require Self Made Gem in Jruby Fails After Update to Jruby-1.7.13

Can't require gem in IRB console using jruby

Actually I got it..I had to do a

require 'rubygems' as first instruction

Cheers

How to make tiny_tds gem workable in Jruby 1.7.6 platform

C-ext are not supported by JRuby. they were working to some extend in older versions but the support was never complete (and was dropped) and its very likely tiny_tds uses pieces of the MRI-C API that are not implemented.

people usually use alternatives on JRuby (assuming the gem does not provide native version for C-Ruby as well as JRuby - which many do). for connecting to MS-SQL there's JDBC drivers which will work under Java.
although the API is different than that of tiny_tds you can get emulate some of its pieces - depending how much of tiny_tds you really need, if its too much you should look into libraries such as Sequel or ActiveRecord which can work with MS-SQL using JDBC drivers.

Creating a gem using Jruby and not Ruby

Using the following commands

jruby -S gem build jruby_gem.gemspecs

and

jruby -S gem install jruby_gem-0.0.0-java.gem

worked for me, finally.



Related Topics



Leave a reply



Submit