I am getting the below error while releasing and pushing the gem. I tried installing it multiple times. Ruby Version is 2.2.9
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bump
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command release
I am running from the script and the script has the following lines:-
bundle install --deployment
gem install release -v '~> 0.4.0'
bundle exec gem release --tag --host http://rubygems/
gem install bump -v 0.8.0
bundle exec gem bump --push
Following is the log
Installing ri documentation for release-0.4.0
Done installing documentation for highline, visionmedia-commander, release after 3 seconds
3 gems installed
**ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command release**
Successfully installed bump-0.8.0
Parsing documentation for bump-0.8.0
Installing ri documentation for bump-0.8.0
Done installing documentation for bump after 0 seconds
1 gem installed
**ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bum**p
Added the dependency in Gemfile. Below is the Gemfile
source 'http://rubygems'
gem 'bump', '~> 0.8.0'
gem 'release', '~> 0.4.0'
I guess the source of rubygems is not defined properly. You may try updating source in Gemfile from 'http://rubygems' to 'https://rubygems.org'.
Related
┌─[alzaeem#Parrot]─[~/tools]
└──╼ $sudo msfconsole
[*] Bundler failed to load and returned this error:
'You have already activated bundler 2.1.4, but your Gemfile requires bundler 2.2.3. Since bundler is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports bundler as a default gem.'
[*] You may need to uninstall or upgrade bundler
you have to update your bundler version, in this case:
gem install bundler -v 2.2.3
for other gems
gem install 'gem name' -v 'version'
when I use this command to run fastlane:
bundle exec fastlane beta
shows error:
~/Documents/GitHub/cruise-open/ios on main! ⌚ 14:59:47
$ bundle exec fastlane beta ‹ruby-3.0.0›
Could not find gem 'xcode-install' in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.
Run `bundle install` to install missing gems.
(base)
then I install xcode-install like this:
$ gem install xcode-install ‹ruby-3.0.0›
Fetching xcode-install-2.6.8.gem
Successfully installed xcode-install-2.6.8
Parsing documentation for xcode-install-2.6.8
Installing ri documentation for xcode-install-2.6.8
Done installing documentation for xcode-install after 0 seconds
1 gem installed
(base)
still not fix this problem. what should I do to fix it?
In your Gemfile you need to add this line:
gem "xcode-install"
Right after
gem "fastlane"
And run fastlane command again.
I am trying to install the gems from my Gemfile to my project, but when I have performed "bundle install", the bundler started installing the default gems, but not that one from my Gemfile.
Gemfile dir: C:\Users\ipinhei5\Desktop\Automation\napps-ANDROIDmation
See below:
[bundle installing default gems]
C:\Users\ipinhei5\Desktop\Automation\napps-ANDROIDmation>bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using CFPropertyList 3.0.0
Using to_boolean 1.0.2
Using android-adb-extension 0.1.2
Using awesome_print 1.8.0
Using backports 3.13.0
Using builder 3.2.3
Using bundler 2.0.1
Fetching byebug 11.0.1
Installing byebug 11.0.1 with native extensions
[My project Gemfile]:
source "https://rubygems.org"
gem "calabash-cucumber"
gem 'calabash-android'
gem 'cucumber'
gem 'rspec'
gem 'yml_reader'
gem 'rest-client'
gem 'android-adb-extension', '~> 0.1.1'
gem 'pry', '~> 0.10.4'
gem 'pry-byebug', '~> 3.4'
gem 'rubysl-rexml'
gem 'cpf_generator', '~> 1.0'
gem 'meglish', '~> 1.0', '>= 1.0.5'
gem 'pluoa-mapper', '~> 1.0', '>= 1.0.2'
Could you help me how to install the gems from my Gemfile?
Edit 1: I think I misunderstood gems with dependencies.
Edit 2:
I got some errors from installing json package
Fetching json 2.2.0
Installing json 2.2.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
C:/Ruby24-x64/bin/ruby.exe -I C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0 -r
./siteconf20190412-3460-119pn5l.rb extconf.rb
creating Makefile
current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
make "DESTDIR=" clean
current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="
Gem files will remain installed in
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0 for inspection.
Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.2.0/gem_make.out
An error occurred while installing json (2.2.0), and Bundler cannot continue.
Make sure that gem install json -v '2.2.0' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile:
calabash-android was resolved to 0.9.8, which depends on
luffa was resolved to 2.1.0, which depends on
json
It's not installing "default" packages. It is installing the packages in your Gemfile and the dependencies of those packages. If you see that it's installing packages that you didn't specify in your Gemfile, it's because those packages are dependencies of one or more of the packages in your Gemfile.
From the bundle install documentation:
Install the dependencies specified in your Gemfile
...Bundler will fetch all remote sources, resolve dependencies and
install all needed gems.
You can use the gem dependency command with the --reverse-dependencies flag to see why a gem was installed. In your case use, for example, gem dependency CFPropertyList --reverse-dependencies to see why the CFPropertyList gem was installed. At the very bottom of the output of the command it will tell you which package required it as a dependency.
You can also check your Gemfile.lock file after you've run bundle install to see the list of packages you have installed and their dependencies. Under the specs header you'll see a list of all the packages that was installed. Some of the packages have a list of indented packages underneath them. Those are the dependencies of the package.
For example, let's see why the to_boolean package was installed:
specs:
android-adb-extension (0.1.2)
to_boolean (~> 1.0)
You had the android-adb-extension as a dependency in your Gemfile and if we check the android-adb-extension page on rubygems, we see that to_boolean it's (only) run-time dependency.
Inside my gemspec file I have:
s.add_runtime_dependency 'rake',
[ '>= 0.9.0.0']
On Windows I install it with the command:
gem install --local myGem-0.9.0.gem
Because --user does not seem to work on windows and it installs in the main ruby gem area.
This works fine the current rake version on that machine is 0.9.2.2 and the current gem version on that machine is 1.8.28
On Ubuntu with the same gemspec file I install it with:
gem install --local --user myGem-0.9.0.gem
which fails with the error:
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: myGem requires rake (>= 0.9.0.0)
The version of rake installed on that machine is: 10.0.4
and then current gem version on that machine is 1.8.23
I tried changing the gemspec file to '>= 9.0.0' and I got the same error.
This gem uses rake at runtime.
This behavior seems quite contrary to the documentation on the gemspec file. How do I accomplish this version test? It works fine without a version dependency value.
When I run 'gem install bundler' for example, it works fine if I am running ruby version 1.9.3, but when running ruby 2.1.2, it seems not to see the 'bundler' arg and gives me
ERROR: While executing gem ... (Gem::CommandLineError)
Please specify at least one gem name (e.g. gem build GEMNAME)
I see this on two different systems running rbenv.
Here is the last part of the output when running with RBENV_DEBUG=1:
+ [rbenv-exec:45] export PATH=/home/ded/.rbenv/versions/2.1.2/bin:/home/ded/.rbenv /libexec:/home/ded/.rbenv/plugins/bundler/bin:/home/ded/.rbenv/plugins/ruby-build/bin:.bundle/bin:/home/ded/.rbenv/shims:/home/ded/.rbenv/bin:/home/ded/.cabal/bin:/home/ded/.emacs/ded/lisp/ecukes:/home/ded/local/node/bin:/home/ded/j64-701/bin:/home/ded/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/plan9/bin
+ [rbenv-exec:45] PATH=/home/ded/.rbenv/versions/2.1.2/bin:/home/ded/.rbenv/libexec:/home/ded/.rbenv/plugins/bundler/bin:/home/ded/.rbenv/plugins/ruby-build/bin:.bundle/bin:/home/ded/.rbenv/shims:/home/ded/.rbenv/bin:/home/ded/.cabal/bin:/home/ded/.emacs/ded/lisp/ecukes:/home/ded/local/node/bin:/home/ded/j64-701/bin:/home/ded/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/plan9/bin
+ [rbenv-exec:47] exec -a gem /home/ded/.rbenv/versions/2.1.2/bin/gem install bundler
ERROR: While executing gem ... (Gem::CommandLineError)
Please specify at least one gem name (e.g. gem build GEMNAME)
Any suggestions what could be going wrong?
Changed my ~/.gemrc from
gem: --document
to
gem: --ri-document
and that solved the problem. Not sure why it was not a problem with ruby 1.9.3.
Try to uninstall all
** $ sudo gem uninstall --all**
2.try to install ruby
** $ sudo gem install ruby**
then install cocoapods then perfectly working
$ sudo gem install cocoapods