Ok I’m new to the ruby world and a complete newbie in jruby/java so
I’m probably being dump but what is wrong here? Why isn’t require
‘java’ working and 2nd (probably be fixed I guess when require java
works) why is require_gem an undefined method??
Ok I’m new to the ruby world and a complete newbie in jruby/java so
I’m probably being dump but what is wrong here? Why isn’t require
‘java’ working and 2nd (probably be fixed I guess when require java
works) why is require_gem an undefined method??
#require returns false when the file has already been loaded. This
means that java has already been required before you tell it to do so.
If it had really failed it would have raised an exception.
I can’t shed any light on the other problem, though
irb(main):002:0> include Java
=> Object
require ‘rubygems’
=> true
require_gem ‘ActiveRecord-JDBC’
NoMethodError: undefined method require_gem' for main:Object from (irb):7:in signal_status’
“require_gem” is an obsolete method in Rubygems, the new one is just
“gem”. Also, since you’re using RC3, you probably want to use
activerecord-jdbc-adapter 0.8 instead…
/Nick
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.