'rails server -e development' fails on Ubuntu
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 docume开发者_Go百科ntation 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)
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 :).
Try this:
rails server --environment development
精彩评论