|
A Rails Website is an application, and so when Rails documentation talks about an application it means the site that you are building. Rails documentation always gives the command-line instructions, because these work for everybody, regardless of which editor/IDE or operating system they use.
To get started you need to first decide where to put the development copy of your new site. Next, open a command prompt window, and use "cd" to make that directory the working directory, e.g.
cd C:\mysites
Now runs the "rails" utility, specifying the name of your new site:
rails mynewsite
Rails then creates a directory called "mysite" containing the files for the site/application, with several subdirectories. The subdirectory "script" is automatically created and populated with useful Ruby scripts, such as "generate" and "server". As these are just ordinary Ruby scripts, you need to call the "ruby" program to run them.
If you now change the working directory of your command prompt to the directory for your new application, then this:
ruby script\server
Is the same as:
ruby.exe C:\mysites\mynewsite\script\server
Only shorter, and without Windows-specific bits.
The whole process:
Start > Run > type "cmd"
md C:\mysites
cd C:\mysites
rails mynewsite
cd mynewsite
ruby script\server
HTH
Last edited by hob; 04-22-2008 at 03:55 PM.
|