How to address terminal not allowing me to run "gem install debug" - ruby

Apologies if this question isn't formatted too well.
I'm working through The Odin Project right now and am now doing the Ruby path (really liked how data structures and algorithms would be included)
Right now, the section I'm working on is the debugging in VScode. The first step was to run the command:
gem install debug
But upon doing this, the command merely brings that process to the foreground without really executing anything.
I checked my gems and whether they needed updated, but even commands like
gem update
gem outdated
didn't work.
What should I do to address this issue?
Going further into detail with what I tried above, those commands simply did the same thing.
gem update
gem outdated
These both started in the foreground without actually doing anything.
The command below worked for me, and it printed the following after it
gem list
*** LOCAL GEMS ***
abbrev (default: 0.1.0)
base64 (default: 0.1.1)
benchmark (default: 0.2.0)
bigdecimal (default: 3.1.1)
bundler (2.3.14, default: 2.3.7)
byebug (11.1.3)
cgi (default: 0.3.1)
coderay (1.1.3)
csv (default: 3.2.2)
date (default: 3.2.2)
debug (1.4.0)
delegate (default: 0.2.0)
did_you_mean (default: 1.6.1)
diff-lcs (1.5.0)
digest (default: 3.1.0)
drb (default: 2.1.0)
english (default: 0.7.1)
erb (default: 2.2.3)
error_highlight (default: 0.3.0)
etc (default: 1.3.0)
fcntl (default: 1.0.1)
fiddle (default: 1.1.0)
fileutils (default: 1.6.0)
find (default: 0.1.1)
forwardable (default: 1.3.2)
getoptlong (default: 0.1.1)
io-console (default: 0.5.11)
io-nonblock (default: 0.1.0)
io-wait (default: 0.2.1)
ipaddr (default: 1.2.4)
irb (default: 1.4.1)
json (default: 2.6.1)
logger (default: 1.5.0)
matrix (0.4.2)
method_source (1.0.0)
minitest (5.15.0)
mutex_m (default: 0.1.1)
net-ftp (0.1.3)
net-http (default: 0.2.0)
net-imap (0.2.3)
net-pop (0.1.1)
net-protocol (default: 0.1.2)
net-smtp (0.3.1)
nkf (default: 0.1.1)
observer (default: 0.1.1)
open-uri (default: 0.2.0)
open3 (default: 0.1.1)
openssl (default: 3.0.0)
optparse (default: 0.2.0)
ostruct (default: 0.5.2)
pathname (default: 0.2.0)
power_assert (2.0.1)
pp (default: 0.3.0)
prettyprint (default: 0.1.1)
prime (0.1.2)
pry (0.14.1)
pry-byebug (3.10.1)
pstore (default: 0.1.1)
psych (default: 4.0.3)
racc (default: 1.6.0)
rake (13.0.6)
rbs (2.1.0)
rdoc (default: 6.4.0)
readline (default: 0.0.3)
readline-ext (default: 0.1.4)
reline (default: 0.3.0)
resolv (default: 0.2.1)
resolv-replace (default: 0.1.0)
rexml (3.2.5)
rinda (default: 0.1.1)
rspec (3.11.0)
rspec-core (3.11.0)
rspec-expectations (3.11.0)
rspec-mocks (3.11.1)
rspec-support (3.11.0)
rss (0.2.9)
ruby2_keywords (default: 0.0.5)
securerandom (default: 0.1.1)
set (default: 1.0.2)
shellwords (default: 0.1.0)
singleton (default: 0.1.1)
stringio (default: 3.0.1)
strscan (default: 3.0.1)
syslog (default: 0.1.0)
tempfile (default: 0.1.2)
test-unit (3.5.3)
time (default: 0.2.0)
timeout (default: 0.2.0)
tmpdir (default: 0.1.2)
tsort (default: 0.1.0)
typeprof (0.21.2)
un (default: 0.2.0)
uri (default: 0.11.0)
weakref (default: 0.1.1)
yaml (default: 0.2.0)
zlib (default: 2.1.1)
What are some other things I can do to debug this issue?

Related

Jekyll pointing to the wrong version of ruby

I am fairly new to using Ruby, Rubygems, jekyll, bundler, and the like. It's not my area of knowledge. But I know enough regarding how to use the terminal to get around this lack of knowledge.
I have Ruby 3.0.0 installed, but for some reason, I get the following in terminal when I run jekyll.
I run:
jekyll new blog
and get the following:
/Library/Ruby/Site/2.6.0/rubygems.rb:281:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)
from /Library/Ruby/Site/2.6.0/rubygems.rb:300:in `activate_bin_path'
from /usr/local/bin/jekyll:23:in `<main>'
These are my local gems:
*** LOCAL GEMS ***
abbrev (default: 0.1.0)
base64 (default: 0.1.0)
benchmark (default: 0.1.1)
bigdecimal (default: 3.0.0)
bundler (default: 2.4.6)
bundler-unload (1.0.2)
cgi (default: 0.2.0)
concurrent-ruby (1.2.0)
csv (default: 3.1.9)
date (default: 3.1.0)
dbm (default: 1.1.0)
debug (default: 0.1.0)
delegate (default: 0.2.0)
did_you_mean (default: 1.5.0)
digest (default: 3.0.0)
drb (default: 2.0.4)
english (default: 0.7.1)
erb (default: 2.2.0)
etc (default: 1.2.0)
executable-hooks (1.6.1)
fcntl (default: 1.0.0)
ffi (1.15.5)
fiddle (default: 1.0.6)
fileutils (default: 1.5.0)
find (default: 0.1.0)
forwardable (default: 1.3.2)
forwardable-extended (2.6.0)
gem-wrappers (1.4.0)
getoptlong (default: 0.1.1)
http_parser.rb (0.8.0)
i18n (1.12.0)
io-console (default: 0.5.6)
io-nonblock (default: 0.1.0)
io-wait (default: 0.1.0)
ipaddr (default: 1.2.2)
irb (default: 1.3.0)
jekyll-sass-converter (2.2.0)
jekyll-watch (2.2.1)
json (default: 2.5.1)
kramdown (2.4.0)
kramdown-parser-gfm (1.1.0)
liquid (4.0.4)
listen (3.8.0)
logger (default: 1.4.3)
matrix (default: 0.3.1)
mercenary (0.4.0)
minitest (5.14.2)
mutex_m (default: 0.1.1)
net-ftp (default: 0.1.1)
net-http (default: 0.1.1)
net-imap (default: 0.1.1)
net-pop (default: 0.1.1)
net-protocol (default: 0.1.0)
net-smtp (default: 0.2.1)
nkf (default: 0.1.0)
observer (default: 0.1.1)
open-uri (default: 0.1.0)
open3 (default: 0.1.1)
openssl (default: 2.2.0)
optparse (default: 0.1.0)
ostruct (default: 0.3.1)
pathname (default: 0.1.0)
pathutil (0.16.2)
power_assert (1.2.0)
pp (default: 0.1.0)
prettyprint (default: 0.1.0)
prime (default: 0.1.2)
pstore (default: 0.1.1)
psych (default: 3.3.0)
racc (default: 1.5.1)
rake (13.0.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
rbs (1.0.0)
rdoc (default: 6.3.0)
readline (default: 0.0.2)
readline-ext (default: 0.1.1)
reline (default: 0.2.0)
resolv (default: 0.2.0)
resolv-replace (default: 0.1.0)
rexml (3.2.4)
rinda (default: 0.1.0)
rouge (3.30.0)
rss (0.2.9)
rubygems-bundler (1.4.5)
rubygems-update (3.4.6)
rvm (1.11.3.9)
safe_yaml (1.0.5)
sassc (2.4.0)
securerandom (default: 0.1.0)
set (default: 1.0.1)
shellwords (default: 0.1.0)
singleton (default: 0.1.1)
stringio (default: 3.0.0)
strscan (default: 3.0.0)
syslog (default: 0.1.0)
tempfile (default: 0.1.1)
terminal-table (2.0.0)
test-unit (3.3.7)
time (default: 0.1.0)
timeout (default: 0.1.1)
tmpdir (default: 0.1.1)
tracer (default: 0.1.1)
tsort (default: 0.1.0)
typeprof (0.11.0)
un (default: 0.1.0)
unicode-display_width (1.8.0)
uri (default: 0.10.1)
weakref (default: 0.1.1)
webrick (1.8.1)
yaml (default: 0.1.1)
zlib (default: 1.1.0)
I'm trying to create a static website for my portfolio.
Thanks!

aws-sdk-core/xml/parser.rb:74:in `set_default_engine': Unable to find a compatible xml library), Ruby version 3.0.2

I am having a legacy ruby daemon script that runs on a linux server. On upgrading all ruby and gem package versions with in the instance, the daemon script is now erroring out. Same error I am getting with in irb
**
/home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml/parser.rb:74:in `set_default_engine': Unable to find a compatible xml library. Ensure that you have installed or added to your Gemfile one of ox, oga, libxml, nokogiri or rexml (RuntimeError)
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml/parser.rb:96:in `<class:Parser>'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml/parser.rb:7:in `<module:Xml>'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml/parser.rb:5:in `<module:Aws>'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml/parser.rb:3:in `<top (required)>'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml.rb:8:in `require_relative'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core/xml.rb:8:in `<top (required)>'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core.rb:68:in `require_relative'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-core-3.121.0/lib/aws-sdk-core.rb:68:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-kms-1.48.0/lib/aws-sdk-kms.rb:11:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/ec2-user/.local/share/gem/ruby/gems/aws-sdk-s3-1.102.0/lib/aws-sdk-s3.rb:11:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
... 5 levels...
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- aws-sdk-s3 (LoadError)
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
from (irb):1:in `<main>'
from /usr/share/gems/gems/irb-1.3.5/exe/irb:11:in `<top (required)>'
from /usr/bin/irb:23:in `load'
from /usr/bin/irb:23:in `<main>'
**
aws-sdk-core version : 3.121.0
output for gem list
**
*** LOCAL GEMS ***
abbrev (default: 0.1.0)
aws-eventstream (1.2.0)
aws-partitions (1.501.0)
aws-sdk-core (3.121.0)
aws-sdk-kms (1.48.0)
aws-sdk-s3 (1.102.0)
aws-sdk-sqs (1.44.0)
aws-sigv4 (1.4.0)
base64 (default: 0.1.0)
benchmark (default: 0.1.1)
bigdecimal (3.0.0)
bundler (2.2.22)
cgi (default: 0.2.0)
csv (default: 3.1.9)
daemons (1.4.1)
date (default: 3.1.0)
dbm (default: 1.1.0)
debug (default: 0.1.0)
delegate (default: 0.2.0)
did_you_mean (default: 1.5.0)
digest (default: 3.0.0)
drb (default: 2.0.4)
english (default: 0.7.1)
erb (default: 2.2.0)
etc (default: 1.2.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.6)
fileutils (default: 1.5.0)
find (default: 0.1.0)
forwardable (default: 1.3.2)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.1)
io-console (0.5.7)
io-nonblock (default: 0.1.0)
io-wait (default: 0.1.0)
ipaddr (default: 1.2.2)
irb (1.3.5)
jmespath (1.4.0)
json (2.5.1)
logger (default: 1.4.3)
matrix (default: 0.3.1)
mutex_m (default: 0.1.1)
net-ftp (default: 0.1.2)
net-http (default: 0.1.1)
net-imap (default: 0.1.1)
net-pop (default: 0.1.1)
net-protocol (default: 0.1.0)
net-smtp (default: 0.2.1)
nkf (default: 0.1.0)
observer (default: 0.1.1)
open-uri (default: 0.1.0)
open3 (default: 0.1.1)
openssl (default: 2.2.0)
optparse (default: 0.1.0)
ostruct (default: 0.3.1)
pathname (default: 0.1.0)
pp (default: 0.1.0)
prettyprint (default: 0.1.0)
prime (default: 0.1.2)
pstore (default: 0.1.1)
psych (3.3.0)
racc (default: 1.5.1)
rake (13.0.3)
rdoc (6.3.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.1)
reline (default: 0.2.5)
resolv (default: 0.2.0)
resolv-replace (default: 0.1.0)
rinda (default: 0.1.0)
rubysl-securerandom (2.0.0)
securerandom (default: 0.1.0)
set (default: 1.0.1)
shellwords (default: 0.1.0)
singleton (default: 0.1.1)
stringio (default: 3.0.0)
strscan (default: 3.0.0)
syslog (default: 0.1.0)
tempfile (default: 0.1.1)
time (default: 0.1.0)
timeout (default: 0.1.1)
tmpdir (default: 0.1.2)
tracer (default: 0.1.1)
tsort (default: 0.1.0)
un (default: 0.1.0)
uri (default: 0.10.1)
weakref (default: 0.1.1)
yaml (default: 0.1.1)
zlib (default: 1.1.0)
**
output for gem env
**
RubyGems Environment:
- RUBYGEMS VERSION: 3.2.22
- RUBY VERSION: 3.0.2 (2021-07-07 patchlevel 107) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/share/gems
- USER INSTALLATION DIRECTORY: /home/ec2-user/.local/share/gem/ruby
- RUBY EXECUTABLE: /usr/bin/ruby
- GIT EXECUTABLE:
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /home/ec2-user/.local/share/gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/share/gems
- /home/ec2-user/.local/share/gem/ruby
- /usr/local/share/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--user-install --bindir /home/ec2-user/bin"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/bin
- /usr/local/sbin
- /usr/sbin
- /home/ec2-user/.local/bin
- /home/ec2-user/bin
**
Any help would really be appreciated.
In my case, I just did gem install nokogiri and it is working here.
Perhaps the context/env your daemon script gets is different than running locally, though I'm surprised irb gives the same issue in that case.
For people checking this thread in future, rexml was moved from default to bundled gems in ruby 3.0.0. If aws-sdk-core was working for you before update to ruby 3, all you need to do is add rexml to your gemfile.
Of course previous answers will work, as mentioned in error message any xml library is fine.
The issue got resolved after installing few dependency packages
yum -y install gcc mysql-devel ruby-devel rubygems
and then installing nokogiri worked fine

Can't get rid of local gems

I am trying to uninstall ruby and start over. I am can't get fastlane to work because of all the ruby errors - can't find installed gems, etc. I don't code in ruby and have not used gems before this.
So how do I really start fresh?
Environment:
I am on Big Sur
Installed ruby with brew
Added packages with gem
I have a local Gemfile that looked like
gem "dotenv"
gem "fastlane"
I did this:
% gem uninstall -aIx
INFO: Uninstalled all gems in
and
gem clean
Cleaning up installed gems...
Clean up complete
It looks like it should be showing me a folder here. Not sure if that's a clue.
I also blanked my Gemfile and did
bundle clean --force
Now when I do gem list I still have local gems
% gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.4.1)
bundler (default: 1.17.2)
CFPropertyList (2.3.6)
cmath (default: 1.0.0)
csv (default: 3.0.9)
date (default: 2.0.0)
dbm (default: 1.0.0)
e2mmap (default: 0.1.0)
etc (default: 1.0.1)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.1.0)
forwardable (default: 1.2.0)
io-console (default: 0.4.7)
ipaddr (default: 1.2.2)
irb (default: 1.0.0)
json (default: 2.1.0)
libxml-ruby (3.1.0)
logger (default: 1.3.0)
matrix (default: 0.1.0)
mini_portile2 (2.4.0)
mutex_m (default: 0.1.0)
nokogiri (1.10.1)
openssl (default: 2.1.2)
ostruct (default: 0.1.0)
prime (default: 0.1.0)
psych (default: 3.1.0)
rdoc (default: 6.1.0)
rexml (default: 3.1.9)
rss (default: 0.2.7)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
shell (default: 0.7)
sqlite3 (1.3.13)
stringio (default: 0.0.2)
strscan (default: 1.0.0)
sync (default: 0.5.0)
thwait (default: 0.1.0)
tracer (default: 0.1.0)
webrick (default: 1.4.2)
zlib (default: 1.0.0)
I also see gems in all of the folders listed by gem env
- /Users/me/.gem/ruby/2.6.0
- /Library/Ruby/Gems/2.6.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0

Could not find 'minitest' (~> 5.1) among 42 total gem(s) (Gem::MissingSpecError)

I am new to using React Native and is currently trying to make a simple to-do list. Unfortunately, I cannot proceed rn as I am stuck with this error, which I have no idea how to fix.
What happened?
My react native worked fine until today because of a build failure due to 'RangeError - integer 4294967288 too big to convert to `int' (https://github.com/CocoaPods/CocoaPods/issues/10651).
I accidentally did sudo rm -rf /Library/Ruby/Gems/* while trying to solve the previous issue.
Now, every time I do pod install, I get this error:
Traceback (most recent call last):
16: from /usr/local/Cellar/cocoapods/1.10.1_1/libexec/bin/pod:23:in <main>' 15: from /Library/Ruby/Site/2.6.0/rubygems.rb:301:in activate_bin_path'
14: from /Library/Ruby/Site/2.6.0/rubygems.rb:301:in synchronize' 13: from /Library/Ruby/Site/2.6.0/rubygems.rb:302:in block in activate_bin_path'
12: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1372:in activate' 11: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1390:in activate_dependencies'
10: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1390:in each' 9: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1408:in block in activate_dependencies'
8: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1372:in activate' 7: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1390:in activate_dependencies'
6: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1390:in each' 5: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1408:in block in activate_dependencies'
4: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1372:in activate' 3: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1390:in activate_dependencies'
2: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1390:in each' 1: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1402:in block in activate_dependencies'
/Library/Ruby/Site/2.6.0/rubygems/dependency.rb:311:in to_specs': Could not find 'minitest' (~> 5.1) among 42 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/Users/XXX/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/usr/local/Cellar/cocoapods/1.10.1_1/libexec:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0' , execute gem env` for more information
gem list:
*** LOCAL GEMS ***
abbrev (default: 0.1.0)
actioncable (6.1.4)
actionmailbox (6.1.4)
actionmailer (6.1.4)
actionpack (6.1.4)
actiontext (6.1.4)
actionview (6.1.4)
activejob (6.1.4)
activemodel (6.1.4)
activerecord (6.1.4)
activestorage (6.1.4)
activesupport (6.1.4)
base64 (default: 0.1.0)
benchmark (default: 0.1.1)
bigdecimal (default: 3.0.0)
builder (3.2.4)
bundler (2.2.24)
cgi (default: 0.2.0)
concurrent-ruby (1.1.9)
crass (1.0.6)
csv (default: 3.1.9)
date (default: 3.1.0)
dbm (default: 1.1.0)
debug (default: 0.1.0)
delegate (default: 0.2.0)
did_you_mean (default: 1.5.0)
digest (default: 3.0.0)
drb (default: 2.0.4)
english (default: 0.7.1)
erb (default: 2.2.0)
erubi (1.10.0)
etc (default: 1.2.0)
fcntl (default: 1.0.0)
ffi (1.15.3)
fiddle (default: 1.0.6)
fileutils (default: 1.5.0)
find (default: 0.1.0)
forwardable (default: 1.3.2)
getoptlong (default: 0.1.1)
globalid (0.4.2)
i18n (1.8.10)
io-console (default: 0.5.7)
io-nonblock (default: 0.1.0)
io-wait (default: 0.1.0)
ipaddr (default: 1.2.2)
irb (default: 1.3.5)
json (default: 2.5.1)
logger (default: 1.4.3)
loofah (2.10.0)
mail (2.7.1)
marcel (1.0.1)
matrix (default: 0.3.1)
method_source (1.0.0)
mini_mime (1.1.0)
minitest (5.2.0, 5.1.0)
mutex_m (default: 0.1.1)
net-ftp (default: 0.1.2)
net-http (default: 0.1.1)
net-imap (default: 0.1.1)
net-pop (default: 0.1.1)
net-protocol (default: 0.1.0)
net-smtp (default: 0.2.1)
nio4r (2.5.7)
nkf (default: 0.1.0)
nokogiri (1.11.7 x86_64-darwin)
observer (default: 0.1.1)
open-uri (default: 0.1.0)
open3 (default: 0.1.1)
openssl (default: 2.2.0)
optparse (default: 0.1.0)
ostruct (default: 0.3.1)
pathname (default: 0.1.0)
power_assert (1.2.0)
pp (default: 0.1.0)
prettyprint (default: 0.1.0)
prime (default: 0.1.2)
pstore (default: 0.1.1)
psych (default: 3.3.0)
racc (default: 1.5.1)
rack (2.2.3)
rack-test (1.1.0)
rails (6.1.4)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.3.0)
railties (6.1.4)
rake (13.0.3)
rbs (1.0.4)
rdoc (default: 6.3.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.1)
reline (default: 0.2.5)
resolv (default: 0.2.0)
resolv-replace (default: 0.1.0)
rexml (3.2.5)
rinda (default: 0.1.0)
rss (0.2.9)
rubygems-update (3.2.24)
securerandom (default: 0.1.0)
set (default: 1.0.1)
shellwords (default: 0.1.0)
singleton (default: 0.1.1)
sprockets (4.0.2)
sprockets-rails (3.2.2)
stringio (default: 3.0.0)
strscan (default: 3.0.0)
syslog (default: 0.1.0)
tempfile (default: 0.1.1)
test-unit (3.3.7)
thor (1.1.0)
time (default: 0.1.0)
timeout (default: 0.1.1)
tmpdir (default: 0.1.2)
tracer (default: 0.1.1)
tsort (default: 0.1.0)
typeprof (0.12.0)
tzinfo (2.0.4)
un (default: 0.1.0)
uri (default: 0.10.1)
weakref (default: 0.1.1)
websocket-driver (0.6.5, 0.6.3)
websocket-extensions (0.1.5)
yaml (default: 0.1.1)
zeitwerk (2.4.2)
zlib (default: 1.1.0)
What I did:
bundle install -> Gemfile not found so I did bundle init at the ios file and modified the gem file (but it didn't work)
source "https://rubygems.org" gem 'rails', '~> 6.1.4' gem 'minitest', '~> 5.1' gem 'websocket-driver', '~> 0.6.5'
Would appreciate any help to fix this issue or restart so I can use React Native again.

Error when running Cucumber test scenario in RubyMine

For full transparency, I started learning about Cucumber an hour ago. I've been following a concise tutorial on using Selenium in Ruby with Cucumber and I've had no issues until this point.
In essence, I'm trying to run a test scenario(?) but I am receiving this error:
C:\Ruby27-x64\bin\ruby.exe -EUTF-8 C:\Ruby27-x64\bin\cucumber C:/Users/kanwo/RubymineProjects/untitled/features/1.feature --format Teamcity::Cucumber::Formatter --expand --color -r features
Testing started at 7:09 am ...
wrong number of arguments (given 1, expected 2)
Error creating formatter: Teamcity::Cucumber::Formatter (ArgumentError)
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/formatter/io.rb:12:in `ensure_io'
C:/Program Files/JetBrains/RubyMine 2020.3.2/plugins/ruby/rb/testing/patch/bdd/teamcity/cucumber/cucumber_4_formatter.rb:20:in `initialize'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/formatter/io.rb:30:in `new'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/formatter/io.rb:30:in `new'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/runtime.rb:206:in `create_formatter'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/runtime.rb:195:in `block in formatters'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/configuration.rb:209:in `block in formatter_factories'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/configuration.rb:207:in `map'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/configuration.rb:207:in `formatter_factories'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/runtime.rb:194:in `formatters'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/runtime.rb:174:in `report'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/runtime.rb:76:in `run!'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/lib/cucumber/cli/main.rb:29:in `execute!'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cucumber-5.3.0/bin/cucumber:9:in `<top (required)>'
C:/Ruby27-x64/bin/cucumber:23:in `load'
C:/Ruby27-x64/bin/cucumber:23:in `<main>'
Errors are usually pretty straight-forward but I don't feel I know enough about frameworks(? again, bare with me as I've just jumped into this) so I did some research and found that this has been an issue for a while, as per these instances:
This first link is ugly, you've been warned
2015, Instance 1
2015, Instance 2
2015, Instance 3
2018, Instance 4
2020, Instance 5
2021, Instance 6
2021, 9 days ago, Instance 7
Granted, these aren't all exactly the same error(s) as mine, but they seem to share a theme; versions.
So from my understanding, this is a conflict between versions of Cucumber, RubyMine, and TeamCity.
With that said, am I essentially out of luck here? Can I perform this in something like VSCode instead? I don't like to just dump questions into forums if I don't have to but I can't even begin to know where to start to figure this out.
Also, if it helps, this is what I was running:
Feature: Feature Name
Scenario: Logging in
Given I am on the login page
When I enter my password correctly
Then I will be logged in and provided a confirmation
and these are my local gems:
activesupport (6.1.3)
ast (2.4.2)
benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
builder (3.2.4)
bundler (default: 2.1.4)
cgi (default: 0.1.0)
childprocess (3.0.0)
concurrent-ruby (1.1.8)
csv (default: 3.1.2)
cucumber (5.3.0)
cucumber-core (8.0.1)
cucumber-create-meta (2.0.4)
cucumber-cucumber-expressions (10.3.0)
cucumber-gherkin (15.0.2)
cucumber-html-formatter (9.0.0)
cucumber-messages (13.2.1)
cucumber-tag-expressions (2.0.4)
cucumber-wire (4.0.1)
date (default: 3.0.0)
dbm (default: 1.1.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
diff-lcs (1.4.4)
etc (default: 1.1.0)
fcntl (default: 1.0.0)
ffi (1.15.0 x64-mingw32)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
forwardable (default: 1.3.1)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.0)
i18n (1.8.9)
io-console (default: 0.5.6)
ipaddr (default: 1.2.2)
irb (default: 1.2.6)
jar_wrapper (0.1.8)
json (default: 2.3.0)
logger (default: 1.4.2)
matrix (default: 0.2.0)
middleware (0.1.0)
minitest (5.13.0)
multi_test (0.1.2)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
net-telnet (0.2.0)
observer (default: 0.1.0)
open3 (default: 0.1.0)
openssl (default: 2.1.2)
ostruct (default: 0.2.0)
parallel (1.20.1)
parser (3.0.0.0)
power_assert (1.1.7)
prime (default: 0.1.1)
protobuf-cucumber (3.10.8)
pstore (default: 0.1.0)
psych (default: 3.1.0)
racc (default: 1.4.16)
rainbow (3.0.0)
rake (13.0.1)
rdoc (default: 6.2.1)
readline (default: 0.0.2)
regexp_parser (2.1.1)
reline (default: 0.1.5)
rexml (default: 3.2.3)
rss (default: 0.2.8)
rubocop (1.11.0)
rubocop-ast (1.4.1)
ruby-progressbar (1.11.0)
rubyzip (2.3.0)
sdbm (default: 1.0.0)
selenium (0.2.11)
selenium-webdriver (3.142.7)
singleton (default: 0.1.0)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
sys-uname (1.2.2)
test-unit (3.3.4)
thor (1.1.0)
thread_safe (0.3.6)
timeout (default: 0.1.0)
tracer (default: 0.1.0)
tzinfo (2.0.4)
unicode-display_width (2.0.0)
uri (default: 0.10.0)
webrick (default: 1.6.0)
xmlrpc (0.3.0)
yaml (default: 0.1.0)
zeitwerk (2.4.2)
zip (2.0.2)
zlib (default: 1.1.0)
Any insight is appreciated!
This is a RubyMine bug. Nothing we can fix on the Cucumber end.
You can either consult a non-recommended monkeypatch / hack. Or downgrade to an early version of Cucumber5.
See https://youtrack.jetbrains.com/issue/RUBY-27294 for more information, including other possible workarounds and a time-frame for the fix from Jetbrains.
Luke - Cucumber Ruby committer.
I faced same issue but solved by updating Run settings in RubyMine as per below steps:
Run->Edit Configurations->Templates->Cucumber->Configuration-> Runner Options as "--color -r features -f pretty"

Resources