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.

F2Andy
  • 171
  • 3
  • `jruby -S rails new blog --skip-listen` try to create application by using that command. – kishore cheruku Jun 27 '19 at 08: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 01 '19 at 08:51

1 Answers1

2

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