9/16/2012

Install RoR

must installed first:

1. Ruby Language

Windows 系統可選擇一個好用的 Third Party Tools 裝: Ruby Installer

2. RubyGems packaging system

check out at here

3. SQLite3 Database

check out at here

some recommend guides:


what is Rails?

    you can skip this part if you want. check out the Chinese version here

Basically, the Rails philosophy has following three main guiding principle:
  • DRY – “Don’t Repeat Yourself” – suggests that writing the same code over and over again is a bad thing.
  • Convention Over Configuration – means that Rails makes assumptions about what you want to do and how you’re going to do it, rather than requiring you to specify every little thing through endless configuration files.
  • REST is the best pattern for web applications – organizing your application around resources and standard HTTP verbs is the fastest way to go.
Installing Rails:

  For Windows user, check RailsInstaller

Start a project (default under C:\Sites\)..

$ rails new demo

go into the directory
$ cd demo

connect to the server
  's' == server
  'g' == generate
  'c' == console
$ rails s
or
$ rails server

installes with well IDE..
I choose Sublime Text2

edit ur page..
go into the path which contain the ruby cmd
$ cd C:\SelfProjects\RailsInstaller\Ruby1.9.3\bin
pass Rails 'rails' command to Ruby
$ ruby C:\Sites\demo\script\rails g controller home index

沒有留言:

張貼留言