Skip to content

Failed to install bindex on a Windows 10 PC #6291

@belgoros

Description

@belgoros

I installed jruby 9.2.9.0 on a Windows 10 PC and tried to create a scaffolded Rails app as follows:

jruby -S rails new jruby-blog -T #to skip tests

Several tricks had to be done:

  • modify the generated Gemfile and remove ruby '2.5.7' line, - bundler raised an error complaining about the difference in .ruby-version file (it has jruby-9.2.9.0 declared) and the one declared in the Gemfile.
  • running jruby -S bundle failed because of bindex-0.8.1 gem compilation:
    image

So I tried to install the gem manually:

$ jruby -S gem install bindex -v '0.8.1'
C:/jruby-9.2.9.0/lib/ruby/stdlib/rubygems/defaults/jruby.rb:34: warning: constant Gem::ConfigMap is deprecated
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from C:/jruby-9.2.9.0/lib/ruby/gems/shared/specifications/default/json-2.2.0-java.gemspec:18.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from C:/jruby-9.2.9.0/lib/ruby/gems/shared/specifications/jruby-win32ole-0.8.5.gemspec:17.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from C:/jruby-9.2.9.0/lib/ruby/gems/shared/specifications/default/json-2.2.0-java.gemspec:18.
C:/jruby-9.2.9.0/lib/ruby/stdlib/rubygems/defaults/jruby.rb:34: warning: constant Gem::ConfigMap is deprecated
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from C:/jruby-9.2.9.0/lib/ruby/gems/shared/specifications/jruby-win32ole-0.8.5.gemspec:17.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from C:/jruby-9.2.9.0/lib/ruby/gems/shared/specifications/default/json-2.2.0-java.gemspec:18.
Building native extensions. This could take a while...
ERROR:  Error installing bindex:
        ERROR: Failed to build gem native extension.

    current directory: C:/jruby-9.2.9.0/lib/ruby/gems/shared/gems/bindex-0.8.1/ext/skiptrace
C:/jruby-9.2.9.0/bin/jruby.exe -I C:/jruby-9.2.9.0/lib/ruby/stdlib -r ./siteconf20200619-16248-vjxcvl.rb extconf.rb
extconf failedNo such file or directory - {"SOURCE_DATE_EPOCH"=>"1592574077"}

Gem files will remain installed in C:/jruby-9.2.9.0/lib/ruby/gems/shared/gems/bindex-0.8.1 for inspection.
Results logged to C:/jruby-9.2.9.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/bindex-0.8.1/gem_make.out

Finally, no way to finish a Rails app creation and install the needed gems.

The same issue is reproducible on the 9.2.11.1 version. A temporary solution for bindex gem was to comment out the web-console gem in the development group of the Gemfile. But another error raised, - this time it is sass-rails that stopped the bundler:

Fetching sassc 2.4.0
Installing sassc 2.4.0 with native extensions
C:/jruby-9.2.11.1/lib/ruby/stdlib/rubygems/ext/builder.rb:76: warning: unsupported popen option: err
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/jruby-9.2.11.1/lib/ruby/gems/shared/gems/sassc-2.4.0/ext
C:/jruby-9.2.11.1/bin/jruby.exe -I C:/jruby-9.2.11.1/lib/ruby/stdlib -r
./siteconf20200619-21636-38dzv6.rb extconf.rb
creating Makefile

current directory: C:/jruby-9.2.11.1/lib/ruby/gems/shared/gems/sassc-2.4.0/ext
make "DESTDIR=" clean
current directory: C:/jruby-9.2.11.1/lib/ruby/gems/shared/gems/sassc-2.4.0/ext
make "DESTDIR="
make failedCannot run program "make" (in directory
"C:\jruby-9.2.11.1\lib\ruby\gems\shared\gems\sassc-2.4.0\ext"): CreateProcess
error=2, The system cannot find the file specified

Gem files will remain installed in
C:/jruby-9.2.11.1/lib/ruby/gems/shared/gems/sassc-2.4.0 for inspection.
Results logged to
C:/jruby-9.2.11.1/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/sassc-2.4.0/gem_make.out

An error occurred while installing sassc (2.4.0), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.4.0' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  sass-rails was resolved to 6.0.0, which depends on
    sassc-rails was resolved to 2.1.2, which depends on
      sassc

Environment Information

  • JRuby version: jruby 9.2.11.1 (2.5.7) 2020-03-25 b1f55b1a40 Java HotSpot(TM) 64-Bit Server VM 25.181-b13 on 1.8.0_181-b13 +jit [mswin32-x86_64].

  • Operating system and platform: Windows 10, MINGW64_NT-10.0-17763 PO190000391 3.0.7-338.x86_64 2019-11-21 23:07 UTC x86_64 Msys.

What is wrong with that?
I also have Ruby ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32] installed which works without any problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions