Ruby gem command crash shell Fastlane & Cocoapods - ruby

I am having issues running fastlane and cocoapods for a month now. Any idea what is the issue? Tried RVM, changing the version and so on but nothing works.
I reinstalled fastlane then cocopoda started working again. Now fastlane does not work, error below.
It seems like you wanted to load some plugins, however they couldn't be loaded
[22:05:14]: Please follow the troubleshooting guide: https://docs.fastlane.tools/plugins/plugins-troubleshooting/
Traceback (most recent call last):
8: from /usr/local/bin/fastlane:23:in `<main>'
7: from /usr/local/bin/fastlane:23:in `load'
6: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.170.0/bin/fastlane:23:in `<top (required)>'
5: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.170.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
4: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.170.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
3: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.170.0/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
2: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.170.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:50:in `run!'
/Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:411:in `parse_global_options': ambiguous option: --v (OptionParser::AmbiguousOption)

You didn't include a minimal reproducible example in your post so I can't say for sure if this is the issue because I can't see how you're invoking fastlane. I recommend that you add a complete MRE to questions so people can see exactly how you got to where you are.
That said, it's probably that you are running fastlane --v and not fastlane -v:
$ fastlane --help
...
-v, --version Display version information

Related

How do you run Homebrew internal tests?

I have some test modifications for the homebrew project but when I try and run them:
$ ruby Homebrew/test/caveats_spec.rb
Traceback (most recent call last):
2: from test/caveats_spec.rb:4:in `<main>'
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': cannot load such file -- formula (LoadError)
What gives? I don't see a rakefile either...
Appears the canonical way is via
brew tests which runs all internal tests with the right include path setup.
And to run just one file like tests/caveats_spec.rb (gleaned from brew tests --help)
brew tests --only caveats

No signature files found in META-INF. Cannot proceed (RuntimeError)

I am trying to use calabash-android to start a test sever on a phone in android studio. I am new to this and gotten this far thanks to tutorials.
I downloaded java, ruby, calabash-android, set-up environment variables, created a key store in the .calabash-settings, have a .debug-keystore file in my .android folder.
I am stuck as to what this problem is I can run bundle exec calabash-android resign app-debug.apk fine but when i do bundle exec calabash-android run app-debug.apk, I get the following error message. I am obviously missing something but i am unsure what:
C:\Users\Dell\AndroidStudioProjects\Calabash>bundle exec calabash-android build app-debug.apk
WARNING: skipped META-INF/CERT.RSA as unsafe
Traceback (most recent call last):
8: from C:/Ruby26-x64/bin/calabash-android:23:in `<main>'
7: from C:/Ruby26-x64/bin/calabash-android:23:in `load'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/bin/calabash-android:76:in `<top (required)>'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/bin/calabash-android-build.rb:2:in `calabash_build'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:162:in `fingerprint_from_apk'
3: from C:/Ruby26-x64/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:163:in `block in fingerprint_from_apk'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:163:in `chdir'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:177:in `block (2 levels) in fingerprint_from_apk': **No signature files found in META-INF. Cannot proceed. (RuntimeError)**
I encountered the same issue with latest available versions of ruby (v3.0.2p107) and calabash (v0.9.22).
I avoided the issue by using "bundle install" command and specifying a GemFile with previous versions.
# Contents of Gemfile
source "https://rubygems.org"
ruby "2.5.1"
gem 'calabash-android', '0.9.5'
gem 'cucumber'
gem 'rexml'
gem 'rubyzip', '1.2.1'
You may want to refer to similar issues raised such as https://github.com/calabash/calabash-android/issues/802

Cannot execute rspec using bundle exec rspec

I am pretty new at programming, just learning for a few months, and I have been trying to run rspec for a ruby project I am working on so I can become more familiar with TDD and when I try to run rspec using bundle exec rspec, I get the following exception:
Traceback (most recent call last):
14: from /usr/local/bin/rspec:23:in `<main>'
13: from /usr/local/bin/rspec:23:in `load'
12: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
11: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
10: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
9: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
8: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:96:in `setup'
7: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration_options.rb:22:in `configure'
6: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration_options.rb:109:in `process_options_into'
5: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration_options.rb:109:in `each'
4: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration_options.rb:110:in `block in process_options_into'
3: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1181:in `requires='
2: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1181:in `each'
1: from /var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1181:in `block in requires='
/var/lib/gems/2.5.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1181:in `require': cannot load such file -- spec_helper (LoadError)
I think there may be something wrong with my PATH, as i had to install my gems using sudo command. When trying to make sure bundler was updated I got the following warning:
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using bundler 2.1.4
Using byebug 11.1.1
Following files may not be writable, so sudo is needed:
/usr/local/bin
/var/lib/gems/2.5.0
/var/lib/gems/2.5.0/build_info
/var/lib/gems/2.5.0/cache
/var/lib/gems/2.5.0/doc
/var/lib/gems/2.5.0/extensions
/var/lib/gems/2.5.0/gems
/var/lib/gems/2.5.0/specifications
Using diff-lcs 1.3
Using rspec-support 3.2.2
Using rspec-core 3.2.3
Using rspec-expectations 3.2.1
Using rspec-mocks 3.2.1
Using rspec 3.2.0
my computer is currently running the most recent version of ubuntu and I am using VScode if that provides any help. My current PATH seems like it has many repeated instances of the same thing and I don't know if that is contributing to anything.
My current PATH:
/home/tom/.rbenv/bin:/home/tom/.rbenv/shims:/home/tom/.rbenv/bin:/home/tom/.rbenv/bin:/home/tom/.rbenv/bin:/home/tom/.rbenv/shims:/home/tom/.rbenv/bin:/home/tom/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
any help is greatly appreciated! I am so tired of getting hung up by this and trying to google around figuring out whats wrong hasnt been helping.

Firebase initialization commands not working with catalina

I am doing pod init for a new Xcode project of mine but it fails outputting:
Traceback (most recent call last):
5: from /usr/local/bin/pod:23:in `<main>'
4: from /usr/local/bin/pod:23:in `load'
3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:49:in `run'
1: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n") (RuntimeError)
I have always done this before and never had problems with the terminal since recently updating my mac too latest version.

Calabash for Android on Windows - cannot proceed first test

I know that Calabash is not officially supported by MS but stil developed by community. After configuration I always get the same error:
C:\Users\XXX YYY\CalabashCucumberTest>bundle exec calabash-android run io.apk
No test server found for this combination of app and calabash version. Recreating test server.
WARNING: skipped META-INF/CERT.RSA as unsafe
Traceback (most recent call last):
10: from C:/Ruby25-x64/bin/calabash-android:23:in `<main>'
9: from C:/Ruby25-x64/bin/calabash-android:23:in `load'
8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/bin/calabash-android:86:in `<top (required)>'
7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/bin/calabash-android-run.rb:16:in `calabash_run'
6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/lib/calabash-android/helpers.rb:107:in `build_test_server_if_needed'
5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/bin/calabash-android-build.rb:2:in `calabash_build'
4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/lib/calabash-android/helpers.rb:169:in `fingerprint_from_apk'
3: from C:/Ruby25-x64/lib/ruby/2.5.0/tmpdir.rb:89:in `mktmpdir'
2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/lib/calabash-android/helpers.rb:170:in `block in fingerprint_from_apk'
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/lib/calabash-android/helpers.rb:170:in `chdir'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/calabash-android-0.9.8/lib/calabash-android/helpers.rb:188:in `block (2 levels) in fingerprint_from_apk': No signature files found in META-INF. Cannot proceed. (RuntimeError)
I followed official Github tutorial. I tried different apps, real and emulated devices - result is the same. Can anyone help me with configuration? Maybe I have to use other versions than latest Ruby and selected gems?

Resources