0

I'm trying to add Neo4j graph database to my rails application. I've install neo4j gem. The problem is when I run bundle (with RVM set to JRuby) I get this message for other gems that are not available in jruby (mini_magick to be specific):

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/Felan/.rvm/rubies/jruby-1.7.10/bin/jruby extconf.rb  
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS.

I couldn't find out how to pass options to jruby and I can not remove incompatible gems. How can I work this out? Can anyone point to a good article on how to setup Neo4j for an existing Rails 4 project?

Farzad
  • 263
  • 3
  • 14
  • Did you try doing what the error message suggested? `Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS.` –  May 09 '14 at 15:06
  • possible duplicate of [How to enable C extension support in jRuby?](http://stackoverflow.com/questions/15795942/how-to-enable-c-extension-support-in-jruby) –  May 09 '14 at 15:08
  • Have you considered trying to use Pacer? https://github.com/pangloss/pacer ...it's a JRuby-based graph database traversal engine and is ridiculously powerful. – BtySgtMajor May 09 '14 at 15:08
  • 1
    @LeviStanley, I've been searching for over an hour with no luck! Thanks... I think I'll be using 'Neography' gem. – Farzad May 09 '14 at 15:10

1 Answers1

0

first of all the question is a bit "poorly" asked - you need neo4j gem which is built for JRuby but the gist of the question is your current gem incompatibilities which we get to know very little about.

I strongly recommend not to use -Xcext.enabled=true with JRuby and instead would like to suggest review your gems (starting with the Gemfile). make sure to mark declared gems with native C extensions that do not provide a JRuby native extension alternative as MRI only e.g.

gem 'mysql2', :platform => :mri

be sure to review wisely as the error you provided is a generic one and is definitely not caused by mini_magick since that gem is pure Ruby and should work fine on all Rubies ...

kares
  • 7,076
  • 1
  • 28
  • 38