Hotcocoa安装路径错误

发布于 2024-09-03 01:28:31 字数 1007 浏览 5 评论 0原文

我已经安装了 MacRuby 0.6,然后安装了来自 Github 的 hotcocoa gem。但是,当我尝试使用例如创建热可可应用程序时。

hotcocoa demoapp

我收到错误,

-bash: /usr/local/bin/hotcocoa: No such file or directory

在其他在线文档中键入“which hotcocoa”结果

/usr/bin/hotcocoa

似乎表明这应该已安装到 /usr/local/bin,所以我很困惑(a)它是如何在这里结束的以及(b)为什么它可以即使这两个位置都在我的 PATH 中,也找不到

我安装了 hotcocoa:

sudo macgem install hotcocoa 

我之前错误地安装了 gem,但当我意识到我应该使用 macgem 时,我卸载了它。

echo $PATH

/opt/local/bin:/opt/local/sbin:/usr/local/git/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/ usr/libexec 目录 有

什么想法吗?

附录

作为一个实验,我还更改了 PATH 中项目的顺序,现在可以找到 hotocoa。我的路径现在是...

/usr/local/git/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/local/bin:/bin:/sbin :/usr/sbin:/usr/libexec

.. /usr/bin 早于 /usr/local/bin 列出

当然这仍然不能解释为什么它之前找不到它(所有路径元素似乎都存在)或为什么安装它那里。

I have installed MacRuby 0.6 and then the hotcocoa gem from Github. However, when I try to create a hotcocoa application with eg.

hotcocoa demoapp

I get the error

-bash: /usr/local/bin/hotcocoa: No such file or directory

Typing 'which hotcocoa' results in

/usr/bin/hotcocoa

Other online documentation seems to suggest that this ought to have been installed to /usr/local/bin so I am confused (a) how it ended up here and (b) why it can't be found even though both locations are in my PATH

I installed hotcocoa with:

sudo macgem install hotcocoa 

I had previously done a gem install by mistake but I uninstalled that when I realised I should be using macgem instead.

echo $PATH

/opt/local/bin:/opt/local/sbin:/usr/local/git/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec

Any thoughts?

Addendum

As an experiment, I also changed the order of the items in the PATH and it can now find hotocoa. My PATH is now...

/usr/local/git/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/local/bin:/bin:/sbin:/usr/sbin:/usr/libexec

..with /usr/bin listed earlier than /usr/local/bin

Of course this still doesn't explain why it couldn't find it before (all the path elements seem to exist) or why it was installed there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

想念有你 2024-09-10 01:28:31

感谢您分享您的经验!一段时间以来,我一直在为同样的问题和结果而苦苦挣扎。在我的例子中,路径顺序不是问题。

看起来,对于带有 hotcocoa(通过 sudo macgem 安装)的 MacRuby 0.7.1(通过 RVM 安装),需要使用“sudo”以避免潜在的加载错误。

例如:

(1) 键入“hotcocoa mydemo”,在我的盒子上显示“无法找到 RubyGem hotcocoa (>= 0) (Gem::LoadError)”消息。然而,如果我键入“sudo hotcocoa mydemo”,则不会发生加载错误,并且 Rakefile、config、lib 和资源项可以在“mydemo”目录中列出。

(2) 键入“macrake”会导致 rake 中止:没有要加载的文件 - hotcocoa/application_builder。然而,键入“sudo macrake”会显示 Mydemo 窗口及其“Hello from HotCocoa”消息。

Thank you for sharing your experience! I've been struggling with the same set of issues and outcomes for a while. Path order was a non-issue in my case.

It appears that for MacRuby 0.7.1 (installed via RVM) with hotcocoa (installed via sudo macgem), the use of 'sudo' is required to avoid potential load errors.

For example:

(1) keying in 'hotcocoa mydemo', displays the 'Could not find RubyGem hotcocoa (>= 0) (Gem::LoadError)' message on my box. Whereas, if I key in 'sudo hotcocoa mydemo', no load error occurs and, Rakefile, config, lib, and resources items can be listed in the 'mydemo' directory.

(2) keying in 'macrake' results in rake aborted: no such file to load -- hotcocoa/application_builder. Whereas, keying in 'sudo macrake' displays the Mydemo window and its 'Hello from HotCocoa' message.

站稳脚跟 2024-09-10 01:28:31

我实际上发现在没有 sudo 命令的情况下安装 hotcocoa 是有效的。

I actually found that installing hotcocoa without the sudo command worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文