“rails 服务器-e 开发”在 Ubuntu 上失败

发布于 2024-11-07 06:12:33 字数 1316 浏览 0 评论 0原文

我按照此处的说明尝试在本地安装 Teambox。在说明中,要在 CLI 中键入以下命令:

rails server -e development

但是,当我发出该命令时,我得到以下响应:

root@localhost:/home/oompah/webstuff/teambox# rails server -e development
getopt: invalid option -- 'e'
Terminating...

我删除了 e 选项,并且该命令似乎只是(重新)生成服务器端文件 - 并提示我是否要覆盖现有文件。

不用说,正如文档所示,Teambox 在 http://localhost:3000 上不可用 - 很可能是因为前面的原因上面突出显示的错误。

顺便说一句,我正在 Ubuntu 10.0.4 LTS 上运行。

有人对此有解释吗?文档是否错误(已过时),或者我做错了什么?

[编辑]

我忘了添加:

root@localhost:/home/oompah/webstuff/teambox# rails --version
getopt: unrecognised option '--version'
Terminating...

这很烦人,因为我什至不知道它是什么版本。顺便说一句,我使用以下方法安装了 Rails:

apt-get install rails

[Edit2]

root@localhost:/home/oompah/teambox# gem query | grep rails
Error loading RubyGems plugin "/usr/lib/ruby/gems/1.8/gems/yard-0.6.4/lib/rubygems_plugin.rb": undefined method `overwrite_accessor' for Gem::Specification:Class (NoMethodError)
cucumber-rails (0.3.2)
rails (3.0.3)
rspec-rails (2.3.1)
sprockets-rails (0.0.1)

I am following the instructions here, to try to install Teambox locally. In the instructions, the following command is to be typed at the CLI:

rails server -e development

However when I issue that command, I get the following response:

root@localhost:/home/oompah/webstuff/teambox# rails server -e development
getopt: invalid option -- 'e'
Terminating...

I removed the e option, and the command simply seemed to (re)generate the server side files - and prompted me if I wanted to overwrite the existing files.

Needless to say, Teambox is not available on http://localhost:3000 as the documentation suggests - most likely because of the preceding error highlighted above.

BTW, I am running on Ubuntu 10.0.4 LTS.

Does anyone have an explanation for this?. Is the documentation wrong (outdated), or am I doing something wrong?

[Edit]

I forgot to add:

root@localhost:/home/oompah/webstuff/teambox# rails --version
getopt: unrecognised option '--version'
Terminating...

Which is pretty annoying, since I can't even find out which version it is. Incidentally, I installed rails using:

apt-get install rails

[Edit2]

root@localhost:/home/oompah/teambox# gem query | grep rails
Error loading RubyGems plugin "/usr/lib/ruby/gems/1.8/gems/yard-0.6.4/lib/rubygems_plugin.rb": undefined method `overwrite_accessor' for Gem::Specification:Class (NoMethodError)
cucumber-rails (0.3.2)
rails (3.0.3)
rspec-rails (2.3.1)
sprockets-rails (0.0.1)

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

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

发布评论

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

评论(2

只怪假的太真实 2024-11-14 06:12:33

问题出在 Teambox 站点上的简洁(太简洁?) doco 上。他们列出的命令将运行库存 rails 二进制文件,而不是 /script/ 目录中的二进制文件。

例如,

$which rails
/usr/bin/rails.

这不是你想要的。

将命令更改为:

cd <teambox install dir>

script/rails server -e development.

这将在 teambox 安装的脚本子目录中运行自定义的 Rails 二进制文件,而不是路径上的 Stock Rails 二进制文件:)。

The problem is with the terse (too terse?) doco from the Teambox site. The command they list will run the stock rails binary, not the one in the <teambox install dir>/script/ directory.

e.g.

$which rails
/usr/bin/rails.

This isn't what you want.

Change your command to:

cd <teambox install dir>

script/rails server -e development.

This will run their custom rails binary in the script subdir of your teambox install, not the stock rails binary on your path :).

乄_柒ぐ汐 2024-11-14 06:12:33

试试这个:

rails server --environment development

Try this:

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