I installed uuidtools in Windows 7 x64 with the command:
jruby -S gem install uuidtools
have written a helper:
require 'rubygems'
require 'uuidtools'
module UUIDHelper
def self.parse(uuidstring)
self.uuid = UUID.parse(uuidstring)
end
def before_create()
self.uuid = UUID.timestamp_create().to_s
end
end
but can't get the application to work.
The error message is:
no such file to load -- uuidtools
I searched web pages, tried all possible advices, restarted my Webrick 20 times - still no result.
By clicking "Go to declaration" on timestamp_create, NetBeans opens uuidtools.rb - so it CAN find uuidtools.
What could be wrong?
irb(main):001:0> require 'uuidtools'
LoadError: no such file to load -- uuidtools
from org/jruby/RubyKernel.java:1038:in 'require'
from (irb):1:in 'evaluate'
from org/jruby/RubyKernel.java:1088:in 'eval'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:158:in 'eval_input'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:271:in 'signal_status'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:155:in 'eval_input'
from org/jruby/RubyKernel.java:1419:in 'loop'
from org/jruby/RubyKernel.java:1191:in 'catch'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:154:in 'eval_input'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:71:in 'start'
from org/jruby/RubyKernel.java:1191:in 'catch'
from C:/Program Files/jruby-1.6.4/lib/ruby/1.8/irb.rb:70:in 'start'
from C:\Program Files\jruby-1.6.4\bin\irb:13:in '(root)'
Process Monitor shows me for "require" command:
Operation: CreateFile
Result: PATH NOT FOUND
Path: C:\Program Files\jruby-1.6.4\lib\ruby\gems\1.8\gems\uuidtools-2.1.2\rubyjit\debug?_69049681550F92840CD2088A74CA3191A61CC9CA.class
TID: 160
Desired Access: Read Attributes
Disposition: Open
Options: Open Reparse Point
Attributes: n/a
ShareMode: Read, Write, Delete
AllocationSize: n/a
P.S. It seems to be a general problem with JRuby. Other modules behave in such manner too - they can't be loaded from an application, but from irb they are loaded without problems.