4
$ rails server

Usage: rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: /home/bikram/.rvm/rubies/ruby-1.9.3-p448/bin/ruby

  -b, [--builder=BUILDER]        # Path to a application builder (can be a filesystem path or URL)
  -m, [--template=TEMPLATE]      # Path to an application template (can be a filesystem path or URL)
      [--skip-gemfile]           # Don't create a Gemfile
      [--skip-bundle]            # Don't run bundle install
  -G, [--skip-git]               # Skip Git ignores and keeps
  -O, [--skip-active-record]     # Skip Active Record files
  -S, [--skip-sprockets]         # Skip Sprockets files
  -d, [--database=DATABASE]      # Preconfigure for selected database (options:

mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) # Default: sqlite3 -j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library # Default: jquery -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 -T, [--skip-test-unit] # Skip Test::Unit files [--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9

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

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.

It generated like this but not rails local server. Other versions are:

  • Rails 3.2.14
  • ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
  • gem 2.1.9
  • rvm 1.23.9 (stable)

my gem file is:

source 'https://rubygems.org'

gem 'rails', '3.2.14'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.11.0'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.2'

group :test do
  gem 'capybara', '1.1.2'
end

group :production do
  gem 'pg', '0.12.2'
end
Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
Bikram
  • 483
  • 6
  • 16

2 Answers2

3

This is the default message generated when you try to launch the Rails server in a folder without a Rails application.

You need to run rails new <appname> where appname is the folder you're in prior to launching the server.

If it is a Rails application, then you're likely missing some key files that the server command uses to determine if it is a Rails application.

d_ethier
  • 3,873
  • 24
  • 31
  • i've perfectly did all the steps... still not working the command is working with another application which i have had created earlier... – Bikram Oct 19 '13 at 15:13
2

I guess you are running the command rails server while not in (the root directory) of a Rails application.

Change into your Rails project directory and try again.

zwippie
  • 15,050
  • 3
  • 39
  • 54