在执行宝石,未知的命令 [英] While executing gem, unknown command

查看:97
本文介绍了在执行宝石,未知的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我输入一个gem命令时,比如

  gemtilt

  gemmysql

我得到这个错误:

 执行gem时...< RuntimeError> 
未知命令tilt

当我运行 gem list ,tilt和mysql都显示在列表中,因此它们已安装。实际上,我在列表中的每个项目都会出现这个错误。什么可能导致这种情况?

解决方案

gem 你,它们不是有效的 gem 命令。



也许你让命令行和Bundler混淆?例如,添加

  gemtilt

添加到Gemfile并运行 bundle install 将安装倾斜。但Bundler使用自己的语法,而不是shell脚本。要直接使用 gem 二进制文件安装倾斜,您必须这样做:

  gem install tilt 

运行 gem help 会给你一个 gem 的命令行参数列表。


Whenever I enter a gem command, such as

gem "tilt"

or

gem "mysql"

I get this error:

While executing gem ... <RuntimeError>
Unknown command tilt

When I run gem list, both tilt and mysql show up on the list, so they are installed. In fact, I get this error with every item on the list. What could be causing this?

解决方案

gem isn't lying to you, they aren't valid gem commands.

Perhaps you're confusing the command line with Bundler? For example, adding

gem "tilt"

to a Gemfile and running bundle install will install tilt. But Bundler uses its own syntax, and isn't a shell script. To install tilt using the gem binary directly you'd have to do:

gem install tilt

Running gem help will give you a list of gem's command line arguments.

这篇关于在执行宝石,未知的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆