“rails 服务器-e 开发”在 Ubuntu 上失败
我按照此处的说明尝试在本地安装 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题出在 Teambox 站点上的简洁(太简洁?) doco 上。他们列出的命令将运行库存
rails
二进制文件,而不是/script/
目录中的二进制文件。例如,
这不是你想要的。
将命令更改为:
这将在 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.
This isn't what you want.
Change your command to:
This will run their custom rails binary in the script subdir of your teambox install, not the stock rails binary on your path :).
试试这个:
Try this: