Open dentarg opened 3 years ago
I am guessing this is coming from chruby_auto
when a .ruby-version
file is encountered and chruby_use
invokes the bin/ruby
. I am curious when these gems were installed. What does head -n1 $(which puma)
return? If it differs from which ruby
then it's a GEM_HOME
sharing issue which #419 addresses; and has already been merged into the 1.0.0 branch.
$ head -n1 $(which puma)
#!/usr/bin/env ruby
$ which ruby
/Users/dentarg/.rubies/ruby-2.7.1/bin/ruby
Ah, I see... so it comes from the code at https://github.com/postmodern/chruby/blob/v0.3.9/share/chruby/chruby.sh#L45-L49.
I see the extensions are not built
messages when running /usr/bin/ruby -rrubygems -e ''
(but not as many as above).
and what is the output of tree "$GEM_HOME/extensions"
? I'm curious why ruby is complaining the extensions were not built, despite the gems being in ~/.gem/ruby/2.7.1
.
$ tree "$GEM_HOME/extensions"
/Users/dentarg/.gem/ruby/2.7.1/extensions
└── x86_64-darwin-18
└── 2.7.0-static
├── RedCloth-4.3.2
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── redcloth_scan.bundle
├── bluecloth-2.2.0
│ ├── bluecloth_ext.bundle
│ ├── gem.build_complete
│ ├── gem_make.out
│ └── mkmf.log
├── commonmarker-0.20.2
│ ├── commonmarker
│ │ └── commonmarker.bundle
│ ├── gem.build_complete
│ └── gem_make.out
├── eventmachine-1.2.7
│ ├── fastfilereaderext.bundle
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── rubyeventmachine.bundle
├── ffi-1.12.2
│ ├── ffi_c.bundle
│ ├── gem.build_complete
│ ├── gem_make.out
│ └── mkmf.log
├── ffi-1.13.1
│ ├── ffi_c.bundle
│ ├── gem.build_complete
│ ├── gem_make.out
│ └── mkmf.log
├── http-parser-1.2.2
│ ├── gem.build_complete
│ └── gem_make.out
├── http_parser.rb-0.6.0
│ ├── gem.build_complete
│ ├── gem_make.out
│ └── ruby_http_parser.bundle
├── kgio-2.11.3
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── kgio_ext.bundle
│ └── mkmf.log
├── nio4r-2.5.2
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── nio4r_ext.bundle
├── nio4r-2.5.4
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── nio4r_ext.bundle
├── nokogiri-1.10.10
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── nokogiri
│ └── nokogiri.bundle
├── puma-3.12.0
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── puma
│ └── puma_http11.bundle
├── puma-3.12.6
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── puma
│ └── puma_http11.bundle
├── puma-4.3.5
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── puma
│ └── puma_http11.bundle
├── puma-5.1.0
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── puma
│ └── puma_http11.bundle
├── raindrops-0.19.1
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── raindrops_ext.bundle
├── rdiscount-2.2.0.2
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── rdiscount.bundle
├── redcarpet-3.5.0
│ ├── gem.build_complete
│ ├── gem_make.out
│ └── redcarpet.bundle
├── therubyracer-0.12.3
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── v8
│ └── init.bundle
├── unf_ext-0.0.7.7
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── unf_ext.bundle
├── unicorn-5.7.0
│ ├── gem.build_complete
│ ├── gem_make.out
│ ├── mkmf.log
│ └── unicorn_http.bundle
├── websocket-driver-0.7.3
│ ├── gem.build_complete
│ ├── gem_make.out
│ └── websocket_mask.bundle
└── yajl-ruby-1.4.1
├── gem.build_complete
├── gem_make.out
└── yajl
└── yajl.bundle
34 directories, 90 files
I'm setting a default Ruby like the README suggests
$ cat ~/.ruby-version
2.7.1
If I remove this file, the Ignoring ... because its extensions are not built
messages are not shown when starting tmux
or running the bug report script.
@dentarg Could you show ruby -e 'p RbConfig::CONFIG["ENABLE_SHARED"]'
?
Maybe it's caused by having installed a static-libruby (ENABLE_SHARED=no
) Ruby 2.7.1 before, and the 2.7.1 Ruby being selected is a dynamic-libruby (ENABLE_SHARED=yes
).
~/.rubies/ruby-2.7.1
and ~/.rubies/ruby-2.7.1-static
), https://github.com/postmodern/chruby/pull/431 would solve it reliably in all cases (unless you reinstall over an existing Ruby installation and don't rm -rf
it first, ruby-install
/manual install don't rm -rf
automatically in such a case, ruby-build
does).@eregon
$ ruby -e 'p RbConfig::CONFIG["ENABLE_SHARED"]'
"no"
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
$ which ruby
/Users/dentarg/.rubies/ruby-2.7.1/bin/ruby
Continuing as requested from https://github.com/postmodern/chruby/pull/431#issuecomment-742793122, when I start
tmux
, the messageIgnoring ... because its extensions are not built ...
is printed many times for different gems. Like below.I saw https://github.com/postmodern/chruby/issues/332 which also mentions
gem pristine
, but it seems to reproduce without JRuby (I had one JRuby version installed, but I didmv ~/.rubies/jruby-9.2.11.1 ~/Downloads; mv ~/.gem/jruby ~/Downloads
before running the script above).