ruby on rails 설치하기. + required pkg

ITWeb/서버관리 2011. 9. 7. 13:59

성공은 했는데.. 완전 잘되는 버전은 아닙니다..ㅡ.ㅡ;;
가능 하면.. 걍.. yum 으로 설치 하는 것도..  


# 다운로드

    http://ftp.ruby-lang.org/pub/ruby/1.9/ : ruby 다운로드

    http://rubyonrails.org/download : rubygem 다운로드

    http://ftp.gnu.org/gnu/readline/ : readline 다운로드

    http://www.sqlite.org/download.html : sqlite3 다운로드

 

# 설치

    root 로 설치

    http://sungdh86.springnote.com/pages/1169000

    http://www.mimul.com/pebble/default/2009/11/21/1258794180000.html

 

# root 로 설치

# 압축풀기

    tar -xvzf readline-6.2.tar.gz

 

# configure & make

    cd readline-6.2

    ./configure --prefix=/home/계정/app/readline --enable-shared

    make

    make install

    vi /etc/ld.so.conf

        /home/계정/app/readline/lib 추가

    /sbin/ldconfig

 

# root 로 설치

# 압축풀기

    tar -xvzf sqlite-autoconf-3070602.tar.gz

 

# configure & make

    cd /home/계정/db

    mkdir sqlite

    cd /home/계정/dist/sqlite-autoconf-3070602

    ./configure --prefix=/home/계정/db/sqlite

    make

    make install

    vi /etc/ld.so.conf

        include /home/계정/db/sqlite/lib

    /sbin/ldconfig

 

# 일반 user 로 설치

    ruby 설치 시 아래와 같은 오류가 발생 : 일반 계정으로 설치 해야 하나 root 로 설치 했을 경우 오류 발생

echo executable host ruby is required.  use --with-baseruby option.; false ./tool/generic_erb.rb -c -o known_errors.inc ./template/known_errors.inc.tmpl ./defs/known_errors.def
executable host ruby is required. use --with-baseruby option.
make: *** [known_errors.inc] 오류 1

 

# 압축풀기

    tar -xvzf ruby-1.9.2-p180.tar.gz

 

# configure & make

    cd ruby-1.9.2-p180

    ./configure --prefix=/home/계정/app/ruby  --enable-pthread --enable-shared --disable-install-doc

    make

    sudo make install

    vi .bash_profile

        PATH=$HOME/app/ruby/bin

 

# using openssl

cd ruby-1.9.2-p180/ext/openssl
ruby extconf.rb
make
sudo make install

 

# using zlib

cd ruby-1.9.2-p180/ext/zlib
ruby extconf.rb
make
sudo make install

 

# 참고 사이트

    http://www.tutorialspoint.com/ruby-on-rails/rails-and-rake.htm

# root 로 설치

# 압축풀기

    tar -xvzf rubygems-1.8.1.gz

 

#configure & make

    cd rubygems-1.8.1

    ruby setup.rb all // ruby setup.rb config; ruby setup.rb setup; ruby setup.rb install

    gem install -y  rails --include-dependencies

    gem install -y  rake --include-dependencies

    gem install -y  bundler

    gem install -y  mysql2 --version 0.2.7

    gem install -y   actionmailer --version 3.0.3

    gem install -y   activerecord --version 3.0.3

    gem install -y  paperclip --version 2.3.8

    gem install -y  rails --version 3.0.3

    gem install -y  will_paginate --version 2.3.15

    gem install -y  rack --version 1.2.1

    gem install -y  rack-mount --version 0.6.13

    gem install -y  tzinfo --version 0.3.24 --include-dependencies

    gem install -y  mail --version 2.2.15 --include-dependencies

    gem install -y  arel --version 2.0.7 --include-dependencies

    gem install -y   actionmailer --version 3.0.7

   

    rails new blog -d mysql

    cd blog

    vi Gemfile

        gem 'mysql2', '0.2.7'

    bundle install

    vi config/database.yml

        실 접속 정보 등록 // user, password, socket

    rake db:create

# 오류 발생 시 Gemfile 에 0.2.7 version 명시

WARNING: This version of mysql2 (0.3.2) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1
WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter)

(See full trace by running task with --trace)

 

    rake db:seed //db:schema:load, db:migrate

#오류 발생 시 : mysql 의 innodb 설정에서 innodb_force_recovery=0 으로 변경할 것.

rake aborted! Mysql::Error: Error on rename of './test_development/schema_migrations' to './test_development/#sql2-c7b-c' (errno: -1): CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)

 

 

# 다운로드

    http://www.kernel.org/pub/software/scm/git/

 

# 압축풀기

    tar -xvzf git-1.7.5.tar.gz

 

# configure & make

    cd git-1.7.5

    ./configure --prefix=/usr/local/git --with-openssl=/usr/local/ssl --with-zlib=/usr/local/zlib

    make

    sudo make install

 

# git proxy 설정

# 다운로드

    http://www.agroman.net/corkscrew/

 

# configure & make

    tar -xvzf corkscrew-2.0.tar.gz

    cd corkscrew-2.0

    ./configure --prefix=/usr/local/corkscrew

    make

    sudo make install

# root 계정

    cd /usr/local/corkscrew/bin

    vi gitproxy.sh

#!/bin/bash
/usr/local/corkscrew/bin/corkscrew  $*

    

: