Skip to content

Instantly share code, notes, and snippets.

@calavera
Created July 5, 2010 22:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calavera/464777 to your computer and use it in GitHub Desktop.
Save calavera/464777 to your computer and use it in GitHub Desktop.
[david@calavera:voldemort-0.81]$ jdev -S jirb
no such file to load -- wirble
jruby-1.5.1 > require 'lib/voldemort_client'
=> true
require 'java'
PATH_TO_VOLDEMORT = '.'
require File.expand_path('dist/voldemort-0.81.jar', PATH_TO_VOLDEMORT)
Dir[File.expand_path('lib/*.jar', PATH_TO_VOLDEMORT)].each {|jar| require jar}
#include_package "org.jdom"
module VoldemortClient
#include_package "voldemort.client"
import 'voldemort.client.ClientConfig';
import 'voldemort.client.SocketStoreClientFactory';
import 'voldemort.client.StoreClient';
import 'voldemort.client.StoreClientFactory';
import 'voldemort.versioning.Versioned';
# alternately, use the #import method
import "voldemort.client"
end
@rjurney
Copy link

rjurney commented Jul 5, 2010

Strangely, the same code gets me:

NameError: cannot link Java class voldemort.client.SocketStoreClientFactory, probable missing dependency: org/jdom/Content
from /Users/rjurney/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/module.rb:53:in import' from ./voldemort_client.rb:39 from ./voldemort_client.rb:2:inrequire'
from (irb):2

Does that mean we have a difference in environments or something?

@calavera
Copy link
Author

calavera commented Jul 5, 2010

it shouldn't be related with the environment. I'm also using a mac and I'm testing it with JRuby 1.5.1 and the development version and both work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment