0

I am trying to create a new Rails project (5.2.3), rails new test5. It fails during the "run bundle install":

Fetching bindex 0.7.0
Installing bindex 0.7.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

This then leads to further errors, with make not available, and it exits.

I am using JRuby (9.2.7), and that may well be why it fails to install native extensions, but I have no idea how to solve the issue. I have seen comments that suggest you can modify the gemfile so bindex is not required, but as this is a new project, there is no gemfile yet.

I can also see it if I do gem install bindex:

ERROR:  Error installing bindex:
        ERROR: Failed to build gem native extension.

    current directory: C:/jruby/jruby-9.2.7.0/lib/ruby/gems/shared/gems/bindex-0.7.0/ext/skiptrace

The background here is that I have an issue with Warbler on a fair sized project, and I thought it would be a good idea to see if I can use Warbler on a new project, to see if the project is the issue or Warbler. And then I failed at the first step... I have been using JRuby on Rails successfully in this project for 10 years (I am not a professional coder though!); it seems to be something that has updated recently.

I have also tried this (from here):

JRUBY_OPTS="-Xcext.enabled=true"
jruby -S gem install bindex

Also tried bindex 0.5.0 and 0.6.0.

I am on Windows 10 by the way.

Edited to add

I have tried changing the version of Java: Zulu 11 (64 bit), Zulu 8 (32 bit), 1.8.0 (on Win7). And the JRuby version: 9.2.7, 9.1.17.

If I remove Rails 5.2.3, and install 5.2.1, it will undate to 5.2.3 during the creation process, but does successfully create a new project. Trying to create a second project fails, because now it is on Rails 5.2.3 again.

Later, edited to add

I have tried this on a Windows 7 PC, with Java 8, JRuby 9.2.7 and Rails 5.2.3, and get the same error, so not somethung weird about my PC. And yet I still cannot see signs of other people with the error on the internet.

2
  • jruby -S rails new blog --skip-listen try to create application by using that command. Jun 27, 2019 at 8:54
  • Does not work either, I get:java.lang.IllegalCallerException: sun.nio.ch is not open to module org.jruby.dist at java.base/java.lang.Module.addOpens(Module.java:763)
    – F2Andy
    Jul 1, 2019 at 8:51

1 Answer 1

2

Disable the gem web-console in the Gemfile and the bindex requirement will also go away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.