Ruby on Rails
Rails설치 및 Application생성
어느멋진날♡
2011. 1. 11. 18:32
1.Rails 설치 : gem install rails
2.Rails 설치확인: gem list
3.데이터베이스 설치: 예)sqlite firefox plug-in
4.애플리케이션 생성: rails app1
5.데이터베이스 설정: app1/config/database.yml
6.애플리케이션 생성 디렉토리로 이동: cd app1
7.리소스생성: script/generate scaffold model명 필드명:타입
예)script/generate scaffold post name:string email:string ~~~~
8.리소스제거: script/destroy scaffold model명
9.데이터베이스 테이블 생성: rake db:migrate
10.애플리케이션 기동: script/server –p 3001 –e development
11.브라우저에서 애플리케이션 접속: http://localhost:3001