Cannot install homebrew on MacOS M1 - ruby

When I run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
It gives information listed:
==> /usr/bin/sudo /usr/sbin/chown -R ron:admin /opt/homebrew
==> Downloading and installing Homebrew...
HEAD is now at 3f4bcd7eb Merge pull request #10471 from MikeMcQuaid/formula-language-java
Traceback (most recent call last):
22: from /opt/homebrew/Library/Homebrew/brew.rb:31:in `<main>'
21: from /opt/homebrew/Library/Homebrew/brew.rb:31:in `require_relative'
20: from /opt/homebrew/Library/Homebrew/global.rb:23:in `<top (required)>'
19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
17: from /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.1/lib/active_support/core_ext/numeric/time.rb:3:in `<top (required)>'
16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
14: from /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.1/lib/active_support/duration.rb:3:in `<top (required)>'
13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
11: from /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.1/lib/active_support/core_ext/array/conversions.rb:3:in `<top (required)>'
10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
8: from /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.1/lib/active_support/xml_mini.rb:3:in `<top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/time.rb:3:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date.rb:4:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle - /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle (LoadError)
Failed during: /opt/homebrew/bin/brew update --force --quiet
Tried a few ways but doesn't work. Did anyone know how to fix this? Thanks in advance.
ruby --version: ruby 2.6.3p62 (2019-04-16 revision 67580)
[universal.arm64e-darwin20]
which ruby: /usr/bin/ruby
rvm current: system

This was working for me - I had the same problems.
gem uninstall date
and same for io-console, etc, zlib, bigdecimal
and also I had problems with psych and strscan - for this libs i first had to delete the bundles:
rm /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/psych-3.3.0/psych.bundle
rm /Library/Ruby/Gems/2.6.0/gems/psych-3.3.0/lib/psych.bundle
rm /Library/Ruby/Gems/2.6.0/gems/strscan-3.0.0/lib/strscan.bundle
rm /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/strscan-3.0.0/strscan.bundle
before gem uninstall worked. After this homebrew install worked again like a charm.
with
gem update
I also get back again the problem, to take care

Finally workaround. Use brew cleanup to fix the ruby.

Related

Error "dlsym(0x7f8ffd410a90, Init_bigdecimal): symbol not found" on Mac M1 Big Sur

I've faced this issue while using pod install on Macbook M1
abc#MacBook-Air ~ % arch -x86_64 pod install
Traceback (most recent call last):
16: from /opt/homebrew/Cellar/cocoapods/1.10.1/libexec/bin/pod:23:in <main>' 15: from /opt/homebrew/Cellar/cocoapods/1.10.1/libexec/bin/pod:23:in load'
14: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:36:in <top (required)>' 13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 11: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods.rb:9:in <top (required)>'
10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
8: from /Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/core_ext/array/conversions.rb:3:in <top (required)>' 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 5: from /Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/xml_mini.rb:5:in <top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
2: from /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.rb:1:in <top (required)>' 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlsym(0x7f8ffd410a90, Init_bigdecimal): symbol not found - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle (LoadError)
abc#MacBook-Air ~ %
Please give me some advices
As you can see, there is a miss in bigdecimal under gem (bundle not found)
So, to solve this issue, you just need to install this gem.
run this command on terminal:
sudo gem install bigdecimal
It should work.
In general issue like this in the future -> Just check what is in the log.
Here it's
dlsym(0x7f8ffd410a90, Init_bigdecimal): symbol not found - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle
Then the keyword to search is about gems, bigdecimal
good luck!
I got this problem, but only with pod update, weirdly pod install was fine!
Try to install ffi :
arch -x86_64 sudo gem install ffi
And then retry:
pod install
I hope it will be okay for you.
From GitHub https://github.com/flutter/flutter/issues/70796
EDIT: Don't forget to set "Open with Rosetta" in your terminal app.

Sferik/t (Twitter) - On Ruby 2.7.0 (Incompatible library)

ok so I am new to ruby (Just experimenting, I'm a Javascript person) But I have been playing with the Twitter or (t) ruby gem by Sferik (Github Source below) and kept running into mainly Ruby compatibility issues. This CLI script states that it was tested for Ruby 2.4 - 2.7. The first issue was that I'm using a make and the script required 2.4.x or greater so I got ruby 2.7.0 working fine on macOS, rebuilt ruby, rebuilt gems, etc. Now that I have ruby upgraded and gems working again, the specific command I am trying to get to work is:
$ sudo t leaders | xargs t unfollow
Github Source Link: https://github.com/sferik/t
And the output I get is:
Traceback (most recent call last):
21: from /Users/user/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
20: from /Users/user/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
19: from /Users/usert/.rvm/gems/ruby-2.7.0/bin/t:23:in `<main>'
18: from /Users/user/.rvm/gems/ruby-2.7.0/bin/t:23:in `load'
17: from /Users/user/.rvm/gems/ruby-2.7.0/gems/t-3.1.0/bin/t:7:in `<top (required)>'
16: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
15: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
14: from /Users/user/.rvm/gems/ruby-2.7.0/gems/oauth-0.5.4/lib/oauth.rb:8:in `<top (required)>'
13: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
12: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
11: from /Users/user/.rvm/gems/ruby-2.7.0/gems/oauth-0.5.4/lib/oauth/client/helper.rb:2:in `<top (required)>'
10: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
9: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
8: from /Users/user/.rvm/gems/ruby-2.7.0/gems/oauth-0.5.4/lib/oauth/consumer.rb:2:in `<top (required)>'
7: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
6: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
5: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/net/https.rb:23:in `<top (required)>'
4: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
3: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
2: from /Users/user/.rvm/gems/ruby-2.7.0/gems/openssl-2.2.0/lib/openssl.rb:13:in `<top (required)>'
1: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': incompatible library version - /Users/user/.rvm/gems/ruby-2.7.0/gems/openssl-2.2.0/lib/openssl.bundle (LoadError)
It looks like the OpenSSL lib is not compatible. I am not used to debugging Ruby so I'm looking for help on figuring out what library to try to fix, or if I should simply try downgrading Ruby version.

How do I resolve this error when starting ruby?

When run ruby bin/start I am getting this error. Can someone help me understand what to do?
Traceback (most recent call last):
4: from bin/start:4:in `<main>'
3: from bin/start:4:in `require_relative'
2: from /Users/ivana/Desktop/online_projects/NYC Park CLI/lib/environment.rb:3:in `<top (required)>'
1: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- pry (LoadError)
22: from bin/start:4:in `<main>'
21: from bin/start:4:in `require_relative'
20: from /Users/ivana/Desktop/online_projects/NYC Park CLI/lib/environment.rb:3:in `<top (required)>'
19: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:156:in `require'
18: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
17: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:168:in `require'
16: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-0.13.1/lib/pry.rb:78:in `<top (required)>'
15: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
14: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
13: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-0.13.1/lib/pry/cli.rb:134:in `<top (required)>'
12: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-0.13.1/lib/pry/cli.rb:40:in `add_plugin_options'
11: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-0.13.1/lib/pry/cli.rb:40:in `each'
10: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-0.13.1/lib/pry/plugins.rb:55:in `load_cli_options'
9: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
8: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
7: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-byebug-3.7.0/lib/pry-byebug/cli.rb:5:in `<top (required)>'
6: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
5: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
4: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-byebug-3.7.0/lib/pry-byebug/commands.rb:12:in `<top (required)>'
3: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
2: from /Users/ivana/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
1: from /Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-byebug-3.7.0/lib/pry-byebug/commands/exit_all.rb:3:in `<top (required)>'
/Users/ivana/.rvm/gems/ruby-2.6.1/gems/pry-byebug-3.7.0/lib/pry-byebug/commands/exit_all.rb:7:in `<module:PryByebug>': uninitialized constant Pry::Command::ExitAll (NameError)
Turn out, the issue likely stems from your usage of the slightly older pry-byebug 3.7.0 along with the newest pry 0.13.1.
Unfortunately, in pry 0.13.0 there were some changes which require an update of pry-byebug to work with this version. According to the Changelog of pry-byebug 3.9.0, they added initial support for pry 0.13 in this version (and removed support for any older pry version).
Thus, to resolve this issue, you should either upgrade your pry-byebug version to 3.9.0 or downgrade your version of pry to something lower than 0.13. Depending on how exactly you specified the dependencies in your Gemfile, it might be enough to just run the following command to upgrade your version of pry-byebug:
bundle upgrade

Cannot run ruby IRB on Manjaro 18.1

Running ruby scripts from the command line works as it should, but attempting to start the IRB results in a long list of gem dependency errors and a traceback:
Traceback (most recent call last):
5: from /var/lib/snapd/snap/ruby/172/bin/irb:9:in `<main>'
4: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
3: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
2: from /snap/ruby/172/lib/ruby/2.7.0/rubygems.rb:1397:in `<top (required)>'
1: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- rubygems/defaults/operating_system (LoadError)
14: from /var/lib/snapd/snap/ruby/172/bin/irb:9:in `<main>'
13: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
12: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
11: from /snap/ruby/172/lib/ruby/2.7.0/rubygems.rb:1397:in `<top (required)>'
10: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
9: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:161:in `rescue in require'
8: from /snap/ruby/172/lib/ruby/2.7.0/rubygems.rb:204:in `try_activate'
7: from /snap/ruby/172/lib/ruby/2.7.0/rubygems/specification.rb:996:in `find_by_path'
6: from /snap/ruby/172/lib/ruby/2.7.0/rubygems/specification.rb:815:in `stubs'
5: from /snap/ruby/172/lib/ruby/2.7.0/rubygems/specification.rb:932:in `dirs'
4: from /snap/ruby/172/lib/ruby/2.7.0/rubygems.rb:420:in `path'
3: from /snap/ruby/172/lib/ruby/2.7.0/rubygems.rb:374:in `paths'
2: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
1: from /var/lib/snapd/snap/ruby/172/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
/snap/ruby/172/lib/ruby/2.7.0/rubygems/path_support.rb:7:in `<top (required)>': uninitialized constant Gem::PathSupport (NameError)
Ruby was already installed on the system and I also installed the ruby snap package, but cannot get it to work. The system and all packages are fully updated. Seeking help from anyone who has encountered a similar problem.

Can I use PRY with alpine-linux?

I got ruby and ruby-irb installed
For irb, apk add irb-pry was the answer
then
irb
irb(main):00:0>
works
Now I would like to get PRY working.
I got the gem installed but then I got:
03:36:00 848c4ae29411 /
# gem install pry
Successfully installed pry-0.12.0
Parsing documentation for pry-0.12.0
Installing ri documentation for pry-0.12.0
Done installing documentation for pry after 2 seconds
1 gem installed
03:36:11 848c4ae29411 /
# pry
Traceback (most recent call last):
16: from /usr/bin/pry:23:in `<main>'
15: from /usr/bin/pry:23:in `load'
14: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/bin/pry:4:in `<top (required)>'
13: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
12: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
11: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/lib/pry.rb:110:in `<top (required)>'
10: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
8: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/lib/pry/commands.rb:4:in `<top (required)>'
7: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/lib/pry/commands.rb:4:in `each'
6: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/lib/pry/commands.rb:5:in `block in <top (required)>'
5: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/lib/pry/commands/gem_stats.rb:1:in `<top (required)>'
2: from /usr/lib/ruby/gems/2.5.0/gems/pry-0.12.0/lib/pry/commands/gem_stats.rb:2:in `<class:GemStat>'
1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- json (LoadError)
You should be able to,
gem install pry
then
pry
to get an interactive Pry session.
Alpine is an intentionally bare-bones Linux distribution, which means that you have to install libraries and programs yourself before allowing gem to install packages.
This worked for me to get pry running from the Alpine Docker image:
apk update
apk add ruby-dev make gcc libc-dev
gem install json pry --no-document

Resources