错误//用法:rails new APP_PATH [options] //运行'rails server'时

phi*_*dox 5 ruby-on-rails upgrade

背景资料:

我正在使用GIT来获取包含Ruby文件的项目的存储库.该项目位于我Mac上主目录下的SITES文件夹中.

我有Ruby:1.8.7

我刚刚将Rails升级到:3.0.3

我想要完成的就是能够在我已经下载的GIT项目的浏览器中渲染localhost.com:3000,这样我就可以在本地工作了.

我运行命令'rails server'并返回以下消息::

Usage:
  rails new APP_PATH [options]

Options:
      [--skip-gemfile]        # Don't create a Gemfile
  -m, [--template=TEMPLATE]   # Path to an application template (can be a filesystem path or URL)
  -d, [--database=DATABASE]   # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
                              # Default: sqlite3
  -O, [--skip-active-record]  # Skip Active Record files
  -J, [--skip-prototype]      # Skip Prototype files
  -T, [--skip-test-unit]      # Skip Test::Unit files
      [--dev]                 # Setup the application with Gemfile pointing to your Rails checkout
  -r, [--ruby=PATH]           # Path to the Ruby binary of your choice
                              # Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  -G, [--skip-git]            # Skip Git ignores and keeps
  -b, [--builder=BUILDER]     # Path to an application builder (can be a filesystem path or URL)
      [--edge]                # Setup the application with Gemfile pointing to Rails repository

Runtime options:
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -p, [--pretend]  # Run but do not make any changes
  -q, [--quiet]    # Supress status output

Rails options:
  -h, [--help]     # Show this help message and quit
  -v, [--version]  # Show Rails version number 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.
Run Code Online (Sandbox Code Playgroud)

Dav*_*ulc 14

你正在rails server从错误的目录运行.转到包含您的应用程序的目录并从那里运行命令.例如,如果您运行rails new thingy,则thingy在使用时必须位于目录中rails server.


Ult*_*ion 7

从轨道2升级到轨道3时我也得到了这个.然后我跑去rails new .替换所有必要的文件,之后就可以了.