Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gem install error: 'Please specify at least one gem name'

Tags:

ruby

gem

rbenv

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?

like image 974
ddoherty Avatar asked Jul 19 '14 21:07

ddoherty


2 Answers

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.

like image 125
ddoherty Avatar answered Oct 22 '22 03:10

ddoherty


  1. Try to uninstall all ** $ sudo gem uninstall --all**

2.try to install ruby

** $ sudo gem install ruby**

  1. then install cocoapods then perfectly working $ sudo gem install cocoapods
like image 28
user2067162 Avatar answered Oct 22 '22 03:10

user2067162