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

can't install flock which is needed to install bundler #4002

Closed
amiracam opened this issue Jul 8, 2016 · 3 comments
Closed

can't install flock which is needed to install bundler #4002

amiracam opened this issue Jul 8, 2016 · 3 comments

Comments

@amiracam
Copy link

amiracam commented Jul 8, 2016

Environment

Mac OS X 10.10.5

  • JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc)

jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [darwin-x86_64]

  • Operating system and platform (e.g. uname -a)

Darwin Charless-Mac-mini.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Other relevant info you may wish to add:

  • Installed or activated gems

*** LOCAL GEMS ***

gem-wrappers (1.2.7)
jar-dependencies (default: 0.3.2)
jruby-openssl (0.9.15 java)
json (1.8.3 java)
minitest (default: 5.4.1)
net-telnet (default: 0.1.1)
power_assert (default: 0.2.3)
psych (2.0.17 java)
racc (1.4.13 java)
rake (default: 10.4.2)
rdoc (default: 4.2.0)
ruby-debug-base (0.10.6 java)
ruby-debug-ide (0.6.1.beta2)
test-unit (default: 3.1.1)

  • Application/framework version (e.g. Rails, Sinatra)
  • Environment variables

Expected Behavior

A succesful installation of bundler

Actual Behavior

gem install bundler
NotImplementedError: flock unsupported or native support failed to load; see http://wiki.jruby.org/Native-Libraries
flock at org/jruby/RubyFile.java:316
block in read_binary at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems.rb:829
open at org/jruby/RubyIO.java:1131
open at org/jruby/RubyKernel.java:305
read_binary at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems.rb:828
fetch_spec at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/source.rb:146
spec at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/resolver/api_specification.rb:77
add_always_install at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/resolver/installer_set.rb:78
resolve_dependencies at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/dependency_installer.rb:474
install_gem at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:194
block in install_gems at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:255
each at org/jruby/RubyArray.java:1593
install_gems at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:251
execute at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/commands/install_command.rb:158
invoke_with_build_args at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/command.rb:310
process_args at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/command_manager.rb:169
run at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/command_manager.rb:139
run at /Users/charles/.rvm/rubies/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/gem_runner.rb:55
at /Users/charles/.rvm/rubies/jruby-9.1.2.0/bin/jgem:21
load at org/jruby/RubyKernel.java:962
at /Users/charles/.rvm/rubies/jruby-9.1.2.0/bin/gem:4

Secondary test

Charless-Mac-mini:~ charles$ gem install flock
ERROR: Error installing flock:
invalid gem: package metadata is missing in /Users/charles/.rvm/gems/jruby-9.1.2.0/cache/flock-0.5.0.gem
Charless-Mac-mini:~ charles$

@headius
Copy link
Member

headius commented Jul 11, 2016

This is very peculiar. Most of us use OS X for development of JRuby, and we have obviously installed bundler on every release many times.

The missing dependency is not the flock gem, but our internal implementation of flock. We try to use the actual native flock function from C, and that appears to be failing here. It could be a bad install of JRuby, a security blockade from the JVM or the OS, or something else.

I need from you:

  • The output of running this with -Xnative.verbose=true.
  • The output running with -J-Xverbose:jni passed to JRuby (or -Xverbose:jni passed to the JVM).
  • The output of gem --version

I also tried to install the flock gem, but it requires a C extension. It is not required to install bundler.

@enebo
Copy link
Member

enebo commented May 17, 2017

No feed back in a long time. Closing...

@enebo enebo closed this as completed May 17, 2017
@redconfetti
Copy link

I was having this issue when installing jruby-9.1.14.0 locally. I was declaring the tmpdir path in my JRUBY_OPTS, when the directory didn't exist.

export JRUBY_OPTS="--dev -J-Djava.io.tmpdir=${PWD}/tmp"

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

No branches or pull requests

4 participants