I am developing rails 2.3.2 application.
When I type the command "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.
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
my Gemfile is:
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
One of the things rails server does is that it loads all the dependencies/gems required by your Rails app, or at least sets them up to be auto-loaded later when they are needed. This is sometimes called "booting" or loading the "Rails environment".
The Ruby standard library comes with a default web server named WEBrick. As this library is installed on every machine that has Ruby, most frameworks such as Rails and Rack use WEBrick as a default development web server.
In a Rails 2.3 app it is just ./script/server start
For rails 3.2.3 and latest version of rails you can start server by:
First install all gem with command: bundle install
or bundle
.
Then Configure your database to the database.yml
.
Create new database: rake db:create
Then start rails server. rails server
orrails s
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With