Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jruby support #68

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add jruby support #68

wants to merge 6 commits into from

Conversation

zoras
Copy link

@zoras zoras commented Sep 27, 2016

This PR allows suture to be installed on Jruby platform else following error occurs

❯ ruby -v                                                                                                                                        ⏎ ◼
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 [darwin-x86_64]

❯ gem install suture                             ◼
Fetching: sqlite3-1.3.11.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing suture:
  ERROR: Failed to build gem native extension.

    current directory: /Users/zoras/.rvm/gems/jruby-9.1.2.0/gems/sqlite3-1.3.11/ext/sqlite3
/Users/zoras/.rvm/rubies/jruby-9.1.2.0/bin/jruby -r ./siteconf20160927-32871-pky2oo.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at /Users/zoras/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:944
   (root) at /Users/zoras/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at /Users/zoras/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55

extconf failed, exit code 1

Gem files will remain installed in /Users/zoras/.rvm/gems/jruby-9.1.2.0/gems/sqlite3-1.3.11 for inspection.
Results logged to /Users/zoras/.rvm/gems/jruby-9.1.2.0/extensions/universal-java-1.8/2.3.0/sqlite3-1.3.11/gem_make.out

@searls
Copy link
Member

searls commented Sep 27, 2016

Could you please also add jruby to the Travis yml file?

@zoras zoras force-pushed the add_jruby_support branch 3 times, most recently from 8b20d2b to 5fd1288 Compare September 27, 2016 10:18
@zoras zoras force-pushed the add_jruby_support branch 3 times, most recently from 07e4a26 to 19dfa0e Compare September 27, 2016 11:25
@searls
Copy link
Member

searls commented Sep 27, 2016

Does the current failure in Travis make sense to you? I don't get it.

@zoras
Copy link
Author

zoras commented Sep 28, 2016

It's erroring out trying to start rails server for example/rails_app in jruby

@searls
Copy link
Member

searls commented Sep 29, 2016

I just spent a little while looking through this and it looks like there's quite a lot of work left to be done, no?

Before this would work, wouldn't we need to implement a second SQLite wrapper based on RUBY_PLATFORM == "java", using either the jdbc-sqlite3 gem or the activerecord adapter if that'll save time.

@zoras
Copy link
Author

zoras commented Sep 29, 2016

Yes I agree, separate implementation of SQLite wrapper for jruby needs to be written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants