我正在尝试在Ubuntu 10.10终端中运行Rails服务器。但我得到的输出与教程中显示的完全不同:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/rinki/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
-d, [--database=DATABASE] # Preconfigure for selected database (options:
mysql/oracle /postgresql/sqlite3/frontbase/ibm_db)
# Default: sqlite3
-b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path
or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path
or URL)
[--dev] # Setup the application with Gemfile pointing to your Rails
checkout
[--edge] # Setup the application with Gemfile pointing to Rails
repository
[--skip-gemfile] # Don't create a Gemfile
-O, [--skip-active-record] # Skip Active Record files
-T, [--skip-test-unit] # Skip Test::Unit files
-J, [--skip-prototype] # Skip Prototype files
-G, [--skip-git] # Skip Git ignores and keeps
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Supress status output
-s, [--skip] # Skip files that already exist
Rails options:
-v, [--version] # Show Rails version number and quit
-h, [--help] # Show this help message and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
如有任何帮助/建议,我们将不胜感激。
谢谢!
您是否首先在目录中创建了一个项目?看起来你没有。使用rails new
设置项目后,您将能够运行站点的rails服务器。
如果您想在控制台"rails server"中运行rails服务器类型,并且如果您想创建控制台中的新项目类型"rails new project_name">
您正在运行什么版本的Rails?
在终端中键入"rails-v"。如果您没有版本3,那么"rails new app_name"语法将不起作用。这在rails 3中发生了更改。
尝试更新Rails,然后重试:"gemupdaterails"。
这是您能为ubuntu on Rails获得的最好的文档。它将帮助你很容易地设置一切:
https://help.ubuntu.com/community/RubyOnRails