- Instant Rail.http://instantrails.rubyforge.org/wiki/wiki.pl
- Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all pre-configured and ready to run.
- No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment.
- It takes about 50 minutes to install it.
- The hosts file in windows/system32/drivers/etc/hosts was modified to include two domain names www.cookbook.com and typo.
- See tutorial at http://instantrails.rubyforge.org/tutorial/index.html
- In my case, I install the instantRails at D:\software\ruby\InstantRails-1.7-win\InstantRails.
- Here is the link to a quick tutorial using cookbook example contained in instalrails. http://instantrails.rubyforge.org/tutorial/index.html
- I use use_ruby.cmd to set up the path environment variable so that we can use rails command.
- rails cookbook2 automatically create set of directory and related configuration files for web appliation including the mysql database.
- cd cookbook2
- TIPS: Choose "folders" option in the title bar to see the directory structure and content in specific directory in two window layout as in the tutorial.
- It uses the MVC (Model View Controller) design pattern for the web application. The app directory contains the subdirectories with model, viewer, and controller classes.
- In instantrails tutorial, it use MySQL-Front but it was asked by MySQL to remove their software on their web site. We will use phpMyAdmin instead.
- To access the phpMyAdmin,
- Bring back the InstantRail application windows, or go to the install directory and double click on instantRails.exe
- Click on I button, Select Configure | Database (via phpMyAdmin)
- A browser window with url http://127.0.0.1/mysql/ will appear. This is the phpMyAdmin web page.

- Enter cookbook2 in the textbox right under the "Create new database" section. Click the "Create" button beneath it.
- Create table

- Create fields

- Add fields
-
- == Description of contents
- app
Holds all the code that's specific to this particular application.
- app/controllers
Holds controllers that should be named like weblog_controller.rb for
automated URL mapping. All controllers should descend from
ActionController::Base.
- app/models
Holds models that should be named like post.rb.
Most models will descent from ActiveRecord::Base.
app/views
Holds the template files for the view that should be named like
weblog/index.rhtml for the WeblogController#index action. All views uses eRuby
syntax. This directory can also be used to keep stylesheets, images, and so on
that can be symlinked to public.
app/helpers
Holds view helpers that should be named like weblog_helper.rb.
- config
Configuration files for the Rails environment, the routing map, the database, and other dependencies.
- components
Self-contained mini-applications that can bundle controllers, models, and views together.
- lib
Application specific libraries. Basically, any kind of custom code that doesn't
belong controllers, models, or helpers. This directory is in the load path.
public
The directory available for the web server. Contains sub-directories for images, stylesheets,
and javascripts. Also contains the dispatchers and the default HTML files.
- script
Helper scripts for automation and generation.
- test
Unit and functional tests along with fixtures.
- vendor
External libraries that the application depend on. This directory is in the load path.
D:\software\ruby\InstantRails-1.7-win\InstantRails>use_ruby.cmd
D:\software\ruby\InstantRails-1.7-win\InstantRails>CD D:\software\ruby\InstantRa
ils-1.7-win\InstantRails
D:\software\ruby\InstantRails-1.7-win\InstantRails>PATH D:\software\ruby\Instant
Rails-1.7-win\InstantRails\ruby\bin;D:\software\ruby\InstantRails-1.7-win\Instan
tRails\mysql\bin;C:\Perl\site\bin;C:\Perl\bin;c:\ruby\bin;C:\Program Files\Real\
RealProducer Basic 11;C:\Program Files\Java\jdk1.5.0_07\bin;C:\Program Files\Mic
rosoft Visual Studio 8\VC\bin;C:\Sun\AppServer\bin;C:\WINDOWS\system32;C:\WINDOW
S;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program
Files\Intel\Wireless\Bin\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;
;C:\Program Files\PuTTY;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\My
SQL\MySQL Server 5.0\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\W
inNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program File
s\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\
VC98\bin;;C:\Program Files\SSH Communications Security\SSH Secure Shell;;C:\PROG
RA~1\COMMON~1\MUVEET~1\030625
D:\software\ruby\InstantRails-1.7-win\InstantRails>cd rails_apps
D:\software\ruby\InstantRails-1.7-win\InstantRails\rails_apps>dir
Volume in drive D is ACERDATA
Volume Serial Number is 682C-8F25
Directory of D:\software\ruby\InstantRails-1.7-win\InstantRails\rails_apps
03/24/2007 08:19 PM .
03/24/2007 08:19 PM ..
03/24/2007 08:19 PM .metadata
03/24/2007 08:19 PM cookbook
03/24/2007 08:19 PM typo-2.6.0
0 File(s) 0 bytes
5 Dir(s) 15,938,129,920 bytes free
D:\software\ruby\InstantRails-1.7-win\InstantRails\rails_apps>rails cookbook2
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create components
create db
create doc
create lib
create lib/tasks
create log
create public/images
create public/javascripts
create public/stylesheets
create script/performance
create script/process
create test/fixtures
create test/functional
create test/integration
create test/mocks/development
create test/mocks/test
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.rb
create app/helpers/application_helper.rb
create test/test_helper.rb
create config/database.yml
create config/routes.rb
create public/.htaccess
create config/boot.rb
create config/environment.rb
create config/environments/production.rb
create config/environments/development.rb
create config/environments/test.rb
create script/about
create script/breakpointer
create script/console
create script/destroy
create script/generate
create script/performance/benchmarker
create script/performance/profiler
create script/process/reaper
create script/process/spawner
create script/process/inspector
create script/runner
create script/server
create script/plugin
create public/dispatch.rb
create public/dispatch.cgi
create public/dispatch.fcgi
create public/404.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
D:\software\ruby\InstantRails-1.7-win\InstantRails\rails_apps