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
One Line If Statement Not Working
Gracefully Shutting Down Sidekiq Processes
Rails Console Is Not Outputting SQL Statements to My Development Log
How to Get Data from Database in Ruby
What Is a Very Simple Authentication Scheme for Sinatra/Rack
Where to Place Private Methods in Ruby
Find Values in Common Between Two Arrays
Rails in Rendering Unnecessary Information
Count, Size, Length...Too Many Choices in Ruby
Rspec Controller Testing - Blank Response.Body
Selenium Can't Find Fields with Type Number
Ruby Ternary Operator and Method Call
Differencebetween 'Raise "Foo"' and 'Raise Exception.New("Foo")'