설치순서

1) Cygwin 설치하기 루비 버전 포함해서 설치
   
daum@KOyoungmin ~/cookbook
    $ ruby -v
    ruby 1.8.5 (2006-08-25) [i386-cygwin]


$ tar xzvf rubygems-0.9.0.tar.gz
$ cd rubygems-0.9.0
$ su -
# ruby setup.rb

2) gem을 이용한 rails 설치하기   (온라인이 안되는곳 에서 다른방법 있음.)
    
daum@KOyoungmin ~/cookbook$ cd c:\temp
    
daum@KOyoungmin ~/cookbook$ gem install rails
         Successfully installed rails-1.1.6
    
daum@KOyoungmin ~/cookbook$ rails -v
         Rails 1.1.6

3) gem을 이용한 mysql 설치하기
    
daum@KOyoungmin ~/cookbook$ cd c:\temp
    
daum@KOyoungmin ~/cookbook$  gem install mysql
 Need to update 15 gems from
http://gems.rubyforge.org
 ...............
 complete
 Select which gem to install for your platform (i386-cygwin)
  1. mysql 2.7.1 (mswin32)
  2. mysql 2.7 (ruby)
  3. mysql 2.6 (ruby)
  4. mysql 2.5.1 (ruby)
  5. Cancel installation
 > 2
 Building native extensions.  This could take a while...
 *** extconf.rb failed ***
 Could not create Makefile due to some reason, probably lack of
 necessary libraries and/or headers.  Check the mkmf.log file for more
 details.  You may need configuration options.

 Provided configuration options:
  --with-opt-dir
                    중략!! 중략!!! 중략!! 중략!!
  --without-mysqlclientlib

 ERROR:  While executing gem ... (RuntimeError)
     ERROR: Failed to build gem native extension.
 Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for ins
 pection.

 Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
 
daum@KOyoungmin /var/run$

4) 신규 rails package생성하기
daum@KOyoungmin ~$ rails blogtest
      create
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts
      create  config/environments
      create  components
        중략!! 중략!!! 중략!! 중략!!
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log

5) rails package 구동하기
    
daum@KOyoungmin ~/$ cd neouserTest
    
daum@KOyoungmin ~/neouserTest$ script/server (서비스 3000번 포트로 구동!!)
      => Booting WEBrick...
      => Rails application started on ttp://0.0.0.0:3000
      => Ctrl-C to shutdown server; call with --help for options
     [2006-12-18 18:22:20] INFO  WEBrick 1.3.1
     [2006-12-18 18:22:20] INFO  ruby 1.8.5 (2006-08-25) [i386-cygwin]
     [2006-12-18 18:22:20] INFO  WEBrick::HTTPServer#start: pid=4948 port=3000

    브라우져에서 확인 가능 (http://127.0.0.1:3000/)

6) 모델 / 컨트롤러 생성하기
 > script/generate model article
 > script/generate controller  article

잘 모르면 하루작업이지만 글쎄.. 가이드데로 한다면 10분안에도 끝날 수 있을것 같다.

글 보관함

카운터

Total : / Today : / Yesterday :
get rsstistory!