3 Creating a New Rails Project
The best way to use this guide is to follow each step as it happens, no code or step needed to make this example application has been left out, so you can literally follow along step by step.
By following along with this guide, you'll create a Rails project called
blog, a
(very) simple weblog. Before you can start building the application, you need to
make sure that you have Rails itself installed.
The examples below use
$ to represent your terminal prompt in a UNIX-like OS,
though it may have been customized to appear differently. If you are using Windows,
your prompt will look something like c:\source_code>3.1 Installing Rails
Open up a command line prompt. On Mac OS X open Terminal.app, on Windows choose "Run" from your Start menu and type 'cmd.exe'. Any commands prefaced with a dollar sign$ should be run in the command line. Verify that you have a
current version of Ruby installed:
A number of tools exist to help you quickly install Ruby and Ruby
on Rails on your system. Windows users can use Rails Installer,
while Mac OS X users can use Tokaido.
$ ruby -vruby 2.0.0p353 |
Many popular UNIX-like OSes ship with an acceptable version of SQLite3. Windows users and others can find installation instructions at the SQLite3 website. Verify that it is correctly installed and in your PATH:
$ sqlite3 --version |
To install Rails, use the
gem install command provided by RubyGems:$ gem install rails |
$ bin/rails --version |
No comments:
Post a Comment