rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 2k forks source link

bundle install fails with ffi even after having gem ffi installed #5714

Closed dsisnero closed 7 years ago

dsisnero commented 7 years ago

This is for shoes4 checkout

c:\Dominic\programming\repos\git\shoes4>gem install ffi -v '1.9.18'
Successfully installed ffi-1.9.18-java
1 gem installed

c:\Dominic\programming\repos\git\shoes4>bundle install
Fetching https://github.com/shoes/furoshiki
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Using rake 12.0.0
Using shoes-core 4.0.0.pre9 from source at `shoes-core`
Using mini_portile 0.6.2
Using shoes-highlighter 1.0.1
Using after_do 0.4.0
Using bundler 1.15.1
Using plist 3.3.0
Using rubyzip 1.2.1
Using jruby-jars 9.1.10.0
Using jruby-rack 1.1.20
Using swt 4.6.1.1
Using formatador 0.2.5
Using rb-fsevent 0.9.8
Fetching ffi 1.9.18
Installing ffi 1.9.18 with native extensions
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:58: warning: Tempfile#unlink or delete called on open file; ignoring
Using ruby_dep 1.5.0
Using lumberjack 1.0.12
Using nenv 0.3.0
Using shellany 0.0.1
Using coderay 1.1.1
Using method_source 0.8.2
Using slop 3.6.0
Using thor 0.19.4
Using guard-compat 1.2.1
Using rspec-support 3.5.0
Using diff-lcs 1.3
Using ast 2.3.0
Using powerpack 0.1.1
Using ruby-progressbar 1.8.1
Using unicode-display_width 1.2.1
Using yard 0.9.9
Using kramdown 1.13.2
Using docile 1.1.5
Fetching json 2.1.0
Installing json 2.1.0 with native extensions
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:58: warning: Tempfile#unlink or delete called on open file; ignoring
Using simplecov-html 0.10.1
Using public_suffix 2.0.5
Using safe_yaml 1.0.4
Using hashdiff 0.3.4
Using hometown 0.2.5
Using benchmark-ips 2.7.2
Using rainbow 2.2.2
Fetching nokogiri 1.6.4.1
Installing nokogiri 1.6.4.1 with native extensions
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:58: warning: Tempfile#unlink or delete called on open file; ignoring
Using warbler 2.0.4
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/gems/shared/gems/ffi-1.9.18/ext/ffi_c
C:/Dominic/rubies/jruby-9.1.10.0/bin/jruby.exe -r
./siteconf20170612-17192-1c23zvl.rb extconf.rb

current directory:
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/gems/shared/gems/ffi-1.9.18/ext/ffi_c
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.

current directory:
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/gems/shared/gems/ffi-1.9.18/ext/ffi_c
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.

make failed, exit code 1

Gem files will remain installed in
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/gems/shared/gems/ffi-1.9.18 for
inspection.
Results logged to
C:/Dominic/rubies/jruby-9.1.10.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.3.0/ffi-1.9.18/gem_make.out

An error occurred while installing ffi (1.9.18), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.18'` succeeds before bundling.

In Gemfile:
  guard-rspec was resolved to 4.7.3, which depends on
    guard was resolved to 2.14.1, which depends on
      listen was resolved to 3.1.5, which depends on
        rb-inotify was resolved to 0.9.8, which depends on
          ffi

##########################

you can see ffi is installed

c:\Dominic\programming\repos\git\shoes4>gem list ffi

*** LOCAL GEMS ***

ffi (1.9.18 java)
public_suffix (2.0.5)
colby-swandale commented 7 years ago

Can you please attach the output of bundle env.

dsisnero commented 7 years ago

c:\Dominic\programming\repos\git\shoes4>bundle env

Environment

Bundler   1.15.1
Rubygems  2.6.11
Ruby      2.3.3p0 (2017-05-25 revision 56859) [java]
Git       2.11.0.windows.3
Platform  universal-java-1.8

Bundler settings

build.nokogiri
  Set for the current user (C:/Dominic/.bundle/config): "--use-system-libraries"
force_ruby_platform
  Set for the current user (C:/Dominic/.bundle/config): "true"
gem.test
  Set for the current user (C:/Dominic/.bundle/config): "minitest"
gem.mit
  Set for the current user (C:/Dominic/.bundle/config): "true"
gem.coc
  Set for the current user (C:/Dominic/.bundle/config): "true"

Gemfile

Gemfile

# frozen_string_literal: true
source 'https://rubygems.org'

gem 'shoes',        path: '.'
gem 'shoes-core',   path: 'shoes-core'
gem 'shoes-swt',    path: 'shoes-swt'
gem 'shoes-package', path: 'shoes-package'

gem 'furoshiki', git: 'https://github.com/shoes/furoshiki'

# For local testing, clone to ../furoshiki and use this line instead
# gem 'furoshiki', path: '../furoshiki'

gem 'shoes-manual'
gem 'shoes-highlighter'

group :development do
  gem "guard"
  gem "guard-rspec"
  gem "listen"

  gem "pry"
  gem "pry-nav"

  gem "rspec", "~>3.5.0"
  gem "rspec-its", "~>1.2.0"
  gem "rake"

  gem "rubocop", "0.47.1"

  gem "yard"
  gem "kramdown"
  gem 'simplecov'
  gem "codeclimate-test-reporter", "~> 1.0"
  gem 'webmock'
  gem 'hometown'
  gem 'benchmark-ips'
end

Gemfile.lock

<No C:/Dominic/programming/repos/git/shoes4/Gemfile.lock found>
segiddins commented 7 years ago

This is because you have force_ruby_platform set to true, so bundler needs the "plain ruby" version of ffi, rather than the java version which is the only one you have installed. If you ran gem install ffi:1.19.18 --platform=ruby, you'd probably see the same output.

colby-swandale commented 7 years ago

I'm closing this for now. If you have any more questions or problems feel free to open a new issue.