例如,当我运行'gem install bundler'时,如果我运行ruby版本1.9.3,它运行正常,但是当运行ruby 2.1.2时,似乎没有看到'bundler'arg并且给了我
ERROR: While executing gem ... (Gem::CommandLineError)
Please specify at least one gem name (e.g. gem build GEMNAME)
我在运行rbenv的两个不同系统上看到了这一点。
以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)
任何可能出错的建议?
答案 0 :(得分:3)
从
更改了〜/ .gemrcgem: --document
到
gem: --ri-document
这解决了这个问题。不确定为什么它不是ruby 1.9.3的问题。
答案 1 :(得分:0)
2.安装ruby
** $ sudo gem install ruby **