我试图在rails应用程序上启动服务器。有些应用程序运行良好,有些则会收到以下消息:
rails s
Usage:
rails new APP_PATH [options]
Options:
[--skip-gemfile] # Don't create a Gemfile
-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
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
-J, [--skip-prototype] # Skip Prototype files
-T, [--skip-test-unit] # Skip Test::Unit files
-G, [--skip-git] # Skip Git ignores and keeps
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
-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:
-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
我使用的是Rails3.0.3和Ruby1.8.7
最佳答案
我认为您正试图用这个命令运行rails 2.x应用程序。它将失败并显示此消息。由于它在某些应用程序上总是失败,请检查它们是否是Rails2.x应用程序。
使用此命令只能运行Rails3.x应用程序。