ruby-on-rails – Rails服务器不以命令“Rails s”开头

我是 ruby和rails的新手,我把rails安装到ubuntu.但是当我通过键入“rails s”进入启动服务器时,它不会启动并发送以下消息.
但是我可以通过命令rails new new_project创建一个新的项目.请铁路专家帮助我.
root@ubuntu:~# rails s Usage: rails new APP_PATH [options] Options: -j,[--javascript=JAVASCRIPT] 
# Preconfigure for selected JavaScript library # Default: jquery -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 -J,[--skip-javascript] # Skip JavaScript files [--edge] 
# Setup the application with Gemfile pointing to Rails repository -G,[--skip-git] 
# Skip Git ignores and keeps -d,[--database=DATABASE] 
# Preconfigure for selected database (options: MysqL/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcMysqL/jdbcsqlite3/jdbcpostgresql/jdbc) 
# Default: sqlite3 -b,[--builder=BUILDER] 
# Path to a application builder (can be a filesystem path or URL) -r,[--ruby=PATH] 
# Path to the Ruby binary of your choice 
# Default: /usr/bin/ruby1.8 [--old-style-hash] 
# Force using old style hash (:foo => 'bar') on Ruby >= 1.9 [--skip-gemfile] 
# Don't create a Gemfile -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 Runtime options: -q,[--quiet] 
# Supress status output -f,[--force] 
# Overwrite files that already exist -s,[--skip] 
# Skip 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. You can specify extra command-line arguments to be used every time 'rails new' runs in the .railsrc configuration file in your home directory. Note that the arguments specified in the .railsrc file don't affect the defaults values shown above in this help message. 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应用程序(除非您已经有一个)
rails new my_app

>转到您的应用程序目录

cd my_app

>启动该目录中的服务器

rails s

相关文章

以下代码导致我的问题: class Foo def initialize(n=0) @n = n end attr_accessor :n d...
这是我的spec文件,当为上下文添加测试“而不是可单独更新用户余额”时,我得到以下错误. require 's...
我有一个拦截器:DevelopmentMailInterceptor和一个启动拦截器的inititializer setup_mail.rb. 但我想将...
例如,如果我有YAML文件 en: questions: new: 'New Question' other: recent: ...
我听说在RSpec中避免它,let,let !,指定,之前和主题是最佳做法. 关于让,让!之前,如果不使用这些,我该如...
我在Rails中使用MongoDB和mongo_mapper gem,项目足够大.有什么办法可以将数据从Mongoid迁移到 Postgres...