西格温 + Rails = 奇怪的警告
每当我运行 rake 命令时,我都会收到以下警告:
其中:没有 sudo (/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/windows:/cygrdrive/c/Windows/System32/Wbem:/cygdrive/.... .
它会在省略号之后以类似的方式列出我的 Windows 环境路径中列出的所有路径。
When ever I run a rake command I get the following warning:
which: no sudo in
(/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/windows:/cygrdrive/c/Windows/System32/Wbem:/cygdrive/.....
it then goes on to list on all of the paths listed in my windows environment paths in a similar fashion after the ellipsis. Any ideas? Google wasn't very much help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Cygwin 没有“sudo”实用程序。 (“sudo”在运行命令之前会提升 root 权限。)
您可以尝试使用以下内容创建一个“sudo”shell 脚本。
这可能有效,但也可能无效。如果没有,您可能必须以“管理员”身份登录才能运行“rake”。或者将您的用户类型更改为“高级用户”。或者将您的用户类型更改为“管理员”。所有这三项更改都会带来一些安全风险。
Cygwin doesn't have a "sudo" utility. ("sudo" raises privileges to root before running commands.)
You can try creating a "sudo" shell script with the following content.
That might work, but it might not. If it doesn't, you might have to log in as "Administrator" before you run "rake". Or change your user type to "Power User". Or change your user type to "Administrator". All three of those changes introduce some security risks.
rake 命令似乎正在尝试运行程序
sudo
,这是一个 Linux 特定程序,不适用于 Cygwin。It appears the rake command is trying to run the program
sudo
, which is a Linux-specific program not available for Cygwin.您也许还可以使用“runas”周围的“sudo”shell 脚本包装器。请参阅
有关 runas 的 Microsoft 文档
了解详情。
You might also be able to use a "sudo" shell script wrapper around "runas". See
Microsoft documentation for runas
for details.