With everything installed, I created my new rails app. From the command line:
C:\Ruby186>rails tenthhole
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db
create doc
create lib
create lib/tasks
create log
create public/images
create public/javascripts
create public/stylesheets
create script/performance
create test/fixtures
create test/functional
create test/integration
create test/performance
create test/unit
create vendor
create vendor/plugins
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create Rakefile
create README
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create config/database.yml
create config/routes.rb
create config/locales/en.yml
create db/seeds.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/new_rails_defaults.rb
create config/initializers/session_store.rb
create config/initializers/cookie_verification_secret.rb
create config/environment.rb
create config/boot.rb
create config/environments/production.rb
create config/environments/development.rb
create config/environments/test.rb
create script/about
create script/console
create script/dbconsole
create script/destroy
create script/generate
create script/runner
create script/server
create script/plugin
create script/performance/benchmarker
create script/performance/profiler
create test/test_helper.rb
create test/performance/browsing_test.rb
create public/404.html
create public/422.html
create public/500.html
create public/index.html
create public/favicon.ico
create public/robots.txt
create public/images/rails.png
create public/javascripts/prototype.js
create public/javascripts/effects.js
create public/javascripts/dragdrop.js
create public/javascripts/controls.js
create public/javascripts/application.js
create doc/README_FOR_APP
create log/server.log
create log/production.log
create log/development.log
create log/test.log
The syntax rails app_name tells rails to create the application with that name and set up all the directories and many of the files I will need. It puts them all in a directory with the apps name. With the basics of an app created, I’ll test it to make sure rails is working. I navigate to C:\Ruby186\tenthhole\ and type
C:\Ruby186\tenthhole>ruby script/server
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-06-13 14:30:48] INFO WEBrick 1.3.1
[2010-06-13 14:30:48] INFO ruby 1.8.6 (2010-02-04) [i386-mingw32]
[2010-06-13 14:30:48] INFO WEBrick::HTTPServer#start: pid=4984 port=3000
[2010-06-13 14:34:03] INFO going to shutdown ...
[2010-06-13 14:34:03] INFO WEBrick::HTTPServer#start done.
That starts the built-in web server that runs locally. In the third line from the bottom, I see that it’s using port 3000, so I open Firefox and navigate to http://localhost:3000 and see this:
That screen means rails installed correctly. Now I can start building my app. Back at the command line, I hit Control+C to exit the web server.
