如何启动rails服务器? [英] How to start rails server?

查看:36
本文介绍了如何启动rails服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 rails 2.3.2 应用程序.

I am developing rails 2.3.2 application.

当我输入命令rails script/server"

为什么我得到以下输出而不是服务器启动?

I got the following output instead of server starting why?

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.

当我输入 linux 命令ls"时,我得到以下目录和文件显示:

When I type linux command "ls" I got the following directories and files showing:

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

我的Gemfile是:

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

推荐答案

在 Rails 2.3 应用程序中,它只是 ./script/server start

In a Rails 2.3 app it is just ./script/server start

这篇关于如何启动rails服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆