Wie starte ich den Rails Server?

Ich entwickle rails 2.3.2 Anwendung.

Geben, wenn ich den Befehl "Schienen script/server"

Habe ich die folgende Ausgabe anstatt der server ab warum?

rails script/server
Usage:
  rails new APP_PATH [options]

Options:
  -J, [--skip-javascript]        # Skip JavaScript files
      [--dev]                    # Setup the application with Gemfile pointing to your Rails checkout
      [--edge]                   # Setup the application with Gemfile pointing to Rails repository
  -G, [--skip-git]               # Skip Git ignores and keeps
  -m, [--template=TEMPLATE]      # Path to an application template (can be a filesystem path or URL)
  -b, [--builder=BUILDER]        # Path to a application builder (can be a filesystem path or URL)
      [--old-style-hash]         # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
      [--skip-gemfile]           # Don't create a Gemfile
  -d, [--database=DATABASE]      # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
                                 # Default: sqlite3
  -O, [--skip-active-record]     # Skip Active Record files
      [--skip-bundle]            # Don't run bundle install
  -T, [--skip-test-unit]         # Skip Test::Unit files
  -S, [--skip-sprockets]         # Skip Sprockets files
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: /home/xichen/.rvm/rubies/ruby-1.8.7-p352/bin/ruby
  -j, [--javascript=JAVASCRIPT]  # Preconfigure for selected JavaScript library
                                 # Default: jquery

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

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.

Geben, wenn ich linux-Befehl "ls" habe ich die folgenden Verzeichnisse und Dateien zeigt:

app  Capfile  config  criptq  db  doc  features  Gemfile  Gemfile.lock  generate  lib  log  nbproject  public  Rakefile  README  script  spec  test  tmp  vendor

meine Gemfile ist:

source "http://rubygems.org"

gem "rails", "2.3.2"
gem "mysql", "2.8.1"
gem "fastercsv"
gem "will_paginate", "2.3.16"
gem "chronic", "0.6.4"
gem "whenever", "0.4.1"
gem "searchlogic", "2.4.28"

group :development do
  gem "mongrel", "1.1.5"
end

group :test do
  gem "rspec", "1.3.2"
  gem "rspec-rails", "1.3.4"
  gem "factory_girl", "1.3.3"
end
Kommentar zu dem Problem
Ich denke, du bist nicht im app-Ordner, wenn Sie die Art dieser Kommentarautor: apneadiving
Meinst du, ich sollte gehen "app" - Ordner? Ich habe versucht, aber ich bekam das gleiche Ergebnis Kommentarautor: Leem
Nein, an der Wurzel Ihres rails-app. Kommentarautor: apneadiving
@ apneadiving, wie Sie oben gesehen haben, ist die Ausgabe von "ls" Befehl zeigt, ich bin in den root meiner rails-app. Kommentarautor: Leem
@ Nicklasos, ich habe meinen Beitrag aktualisiert, als Sie sah, meinem Gemfile zeigt, ich bin mit rails 2.3.2 Kommentarautor: Leem

InformationsquelleAutor der Frage Leem | 2011-09-23

Schreibe einen Kommentar