'Bundler Segmentation Fault when updating a Gem (Ruby)
If i try to update a Gem with Bundler, i got an Segmentation Fault Error.
(Full Error at https://pastebin.com/Ln8EwPwa )
myapp% bundle update --conservative byebug
The git source `git://github.com/rails/coffee-rails.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
The git source `git://github.com/rails/web-console.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/./home/myapp/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: [BUG] Segmentation fault at 0x00000000000070
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-freebsd12.3]
...
...
...
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
zsh: abort (core dumped) bundle update --conservative byebug
Background:
I tried to fix my Ruby on Rails Webapp because puma crashes after 2 days with an segmentation fault. To do this, i tried to find the libaries with c extension with:
bundle show --paths | ruby -e "STDIN.each_line {|dep| puts dep.split('/').last if File.directory?(File.join(dep.chomp, 'ext')) }"
Output:
bcrypt-3.1.16
byebug-8.2.2
concurrent-ruby-1.1.9
debug_inspector-0.0.2
ffi-1.15.4
hiredis-0.5.2
json-1.8.6
nio4r-1.2.1
nokogiri-1.10.10
pg-0.18.4
puma-3.12.6
rb-fsevent-0.11.0
thread_safe-0.3.6
unf_ext-0.0.7.7
websocket-driver-0.6.3
Then i tried to updating a Gem with Bundler and i got an Segmentation Fault Error.
- System:
- FreeBSD 12.3-RELEASE-p1 GENERIC
- Ruby 2.3.1p112
- Rais 5.0.0.beta2
- Bundler 1.17.3
- Gem 2.5.1
- Puma 3.12.6
- Scenario:
I use a old Ruby Version (2.3.1p112) because i maintain a Webapp with an old code-base on FreeBSD12.3.
Sadly, i cant install this Ruby Version with rvm, cause its not supported (so i have to use rbenv). In addition, its not compatible with newer openssl Versions. So i had to manually install OpenSSL 1.0.2q (because its not in the FreeBSD Repos). After that i removed the preinstalled OpenSSL from Freebsd with "pkg remove openssl" (because ruby installation wont work with it) and installed Ruby with the following Command:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/openssl-1.0.2q" rbenv install 2.3.1
Ruby installed fine, but to run puma i had to reinstall openssl from freebsd (1.1.1n) and then i can run my App and install Gems with "Gem install ..." and use "bundle install" or "bundle show"
But if i want to update a specific Gem with Bundler i get the error.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
