arrigonialberto86 / ruby-mining

MIT License
8 stars 1 forks source link

fixed jbundle issues on gem load #3

Closed wstrinz closed 11 years ago

wstrinz commented 11 years ago

Hey Alberto,

I've written some functions to convert information between the data cube format I'm using and arff, so I wanted to try it out with your gem. I noticed that since jbundler doesn't create the '.jbundler' folder until you load it for the first time your gem won't load once its installed. When I try to call require 'ruby_mining' I get an error like

LoadError: no such file to load -- /home/wstrinz/.rvm/gems/jruby-1.7.4/gems/ruby-mining-0.1.0/.jbundler/classpath
    from org/jruby/RubyKernel.java:1054:in `require'

I fixed it with a bit of a hack, having the main ruby_mining.rb change to the gem's base directory, call require 'jbundler' and then change back to the original working directory. There might be a better way to do it, but the cucumber tests seem to work with the fix I put in so I don't think I broke anything.

The mapping between Wekka and Data Cube RDF is actually pretty clean, so I think there's a lot of scope for crossover between our projects. I'll let you know when I get a more substantial integration example together, but I've written some classes and cucumber tests for basic ARFF<->RDF reading and writing if you'd like to take a look:

https://github.com/wstrinz/R2RDF/blob/master/features/writer.feature https://github.com/wstrinz/R2RDF/blob/master/features/reader.feature