0

我正在尝试在 Ubuntu 10.10 终端中运行 Rails Server。但我得到的输出与我的教程中显示的完全不同:

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.

任何帮助/建议将不胜感激。

谢谢!

4

4 回答 4

0

你运行的是什么版本的 Rails?

在您的终端中输入“rails -v”。如果您没有版本 3,那么“rails new app_name”语法将不起作用,因为在 Rails 3 中对此进行了更改。

尝试更新 Rails 并重试:'gem update rails'。

于 2011-04-17T18:21:17.273 回答
0

有没有先在目录下创建项目?看起来你没有。设置项目后,rails new您将能够为该站点运行 rails 服务器。

于 2011-04-17T17:23:52.177 回答
0

这是您可以获得的关于 ubuntu on Rails 的最佳文档。它将帮助您轻松设置所有内容:

https://help.ubuntu.com/community/RubyOnRails

于 2011-04-17T19:24:05.283 回答
0

如果您想在控制台“rails server”中运行 rails server 类型,并且如果您想在控制台中创建新项目类型“rails new project_name”

于 2011-04-17T17:25:38.757 回答