Ruby 企业版 - Rake 未找到

发布于 2024-08-21 18:16:08 字数 693 浏览 10 评论 0原文

我刚刚设置了一个新的 VPS,并安装了带有 Ruby Enterprise Edition 的 Passenger。 但是,我无法让耙子工作。

/opt/ruby-enterprise-1.8.7-2010.01/bin/gem list

* LOCAL GEMS *

actionmailer (2.3.5, 2.2.3)
actionpack (2.3.5, 2.2.3)
activerecord (2.3.5, 2.2.3)
activeresource (2.3.5, 2.2.3)
activesupport (2.3.5, 2.2.3)
fastthread (1.0.7)
formtastic (0.9.7)
justinfrench-formtastic (0.2.4)
mysql (2.8.1)
passenger (2.2.9)
rack (1.1.0, 1.0.1)
rails (2.3.5, 2.2.3)
rails-settings (1.0.0)
rake (0.8.7)
sqlite3-ruby (1.2.5)

当我尝试运行 rake 任务时,我得到:

-bash: rake: command not found

有人可以帮忙吗?

任何建议表示赞赏。

谢谢。

I've just had a new VPS set up and have installed Passenger with Ruby Enterprise Edition.
However, I can't get rake to work.

/opt/ruby-enterprise-1.8.7-2010.01/bin/gem list

* LOCAL GEMS *

actionmailer (2.3.5, 2.2.3)
actionpack (2.3.5, 2.2.3)
activerecord (2.3.5, 2.2.3)
activeresource (2.3.5, 2.2.3)
activesupport (2.3.5, 2.2.3)
fastthread (1.0.7)
formtastic (0.9.7)
justinfrench-formtastic (0.2.4)
mysql (2.8.1)
passenger (2.2.9)
rack (1.1.0, 1.0.1)
rails (2.3.5, 2.2.3)
rails-settings (1.0.0)
rake (0.8.7)
sqlite3-ruby (1.2.5)

When I try and run a rake task, I get:

-bash: rake: command not found

Can anyone help?

Any advice appreciated.

Thanks.

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

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

发布评论

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

评论(2

扭转时空 2024-08-28 18:16:08

我已经使用 REE 大约一年了,并且一直遇到这个问题,我总是通过这样做来处理这个问题:

cd /usr/local/bin
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/gem
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/irb
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/rake

我还必须对 gems 安装的其他二进制文件执行此操作。仅供参考,我用的是Ubuntu。

或者,您可以修改环境的路径(这将使您不必为新的二进制文件创建符号链接),但我更喜欢这种方法,因为我以不同的用户身份运行脚本并且不想修改每个人的路径。

I've been using REE for about a year and have always had this problem, which I've always handled by doing this:

cd /usr/local/bin
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/gem
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/irb
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/rake

I also had to do this for additional binaries installed by gems. Just for reference, I'm using Ubuntu.

Alternatively, you can modify your environment's path (which would save you from having to create symlinks for new binaries), but I prefer this method as I run scripts as different users and don't want to modify everyone's path.

沙沙粒小 2024-08-28 18:16:08

'在执行“gem install rake”之后遇到了同样的问题。

通过执行“sudo apt-get install rake”修复了此问题。

'Had the same problem, after doing "gem install rake".

Fixed this by doing "sudo apt-get install rake".

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