1 == Getting started with Ruby on Rails
3 1. Start the web server: ruby script/server
8 You can interact with the domain model by starting the console through
9 script/console. Here you'll have all parts of the application configured,
10 just like it is when the application is running. You can inspect domain
11 models, change values, and save to the database. Starting the script without
12 arguments will launch it in the development environment.
14 Passing an argument will specify a different environment,
15 like: script/console production
17 To reload your controllers and models after launching the console
21 == Description of contents
24 Holds all the code that's specific to this particular application.
27 Holds controllers that should be named like weblog_controller.rb for
28 automated URL mapping. All controllers should descend from
29 ActionController::Base.
32 Holds models that should be named like post.rb.
33 Most models will descend from ActiveRecord::Base.
36 Holds the template files for the view that should be named like
37 weblog/index.rhtml for the WeblogController#index action. All views use eRuby
38 syntax. This directory can also be used to keep stylesheets, images,
39 and so on that can be symlinked to public.
42 Holds view helpers that should be named like weblog_helper.rb.
45 Holds API classes for web services.
48 Configuration files for the Rails environment, the routing map,
49 the database, and other dependencies.
52 Self-contained mini-applications that can bundle together controllers,
56 Contains the database schema in schema.rb. db/migrate contains all
57 the sequence of Migrations for your schema.
60 Application specific libraries. Basically, any kind of custom code
61 that doesn't belong under controllers, models, or helpers. This
62 directory is in the load path.
65 The directory available for the web server. Contains subdirectories
66 for images, stylesheets, and javascripts. Also contains the dispatchers
67 and the default HTML files.
70 Helper scripts for automation and generation.
73 Unit and functional tests along with fixtures.
76 External libraries that the application depends on. Also includes the
77 plugins subdirectory. This directory is in the load path.