vagrant@lucid32:/vagrant$ sudo apt-get update
vagrant@lucid32:/vagrant$ sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev curl
build-essential
Informational list of build-essential packages. If you do not plan to build Debian packages, you don't need this package. Moreover this package is not required for building Debian packages. This package contains an informational list of packages which are considered essential for building Debian packages. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed. If you have this package installed, you only need to install whatever a package specifies as its build-time dependencies to build the package. Conversely, if you are determining what your package needs to build-depend on, you can always leave out the packages this package depends on. This package is NOT the definition of what packages are build-essential; the real definition is in the Debian Policy Manual. This package contains merely an informational list, which is all most people need. However, if this package and the manual disagree, the manual is correct.
패키지를 빌드할 때 쓰인다. 한국말로 풀어쓰자면 종속관계 패키지인데, make할 때 필수이다. 뭐 apt-get만 하면 필요 없지만... 예전에 kernel compile 할 때 이거 안깔아서 애먹었던 기억이 있다. 근데 왜 기본으로 설치가 안되있는거지;; 라이센스 문제인가
zlib1g-dev
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files.
정의는 저렇지만 ssh-dev에서 쓰기 때문에 의존성 땜시 필요하다.
git-core
git할 때 필수 툴.
sqlite3, libsqlite3-dev
말할 필요 없것제.
curl
Client URL Library Functions의 약자이다. 그러니까 URL 문법으로 클라이언트 측에서 Library를 작동시킬 수 있게 만드는... 툴이지만 대부분 URL을 이용해 library 받아올 때 쓰이는듯;;
HOME 에 가서, rbenv 인스톨
vagrant@lucid32:~$ git clone git://github.com/sstephenson/rbenv.git .rbenv
@@rbenv말고 기능이 확장된 ruby-build? 알아보고 업데이트.
export PATH="$HOME/.rbenv/bin:$PATH"
미리 PATH 에 NEWDIR 가 있는지 확인하면 PATH 가 깨끗해진다.
eval "$(rbenv init -)" 도 .bash_profile 에 추가.
vagrant@lucid32:~$ source .bashrc
bash_profile는 login, bashrc는 non-login 때 쓰이는 shell script. 하지만 우분투는 bashrc를 쓴다! 로그인 했는데 왜일까;;
이제 루비 설치
vagrant@lucid32:~$ git clone git://github.com/sstephenson/ruby-build.git
vagrant@lucid32:~$ cd ruby-build
vagrant@lucid32:~/ruby-build$ sudo ./install.sh
vagrant@lucid32:~/ruby-build$ rbenv install 1.9.2-p290
vagrant@lucid32:~/ruby-build$ rbenv rehash
vagrant@lucid32:~/ruby-build$ rbenv global 1.9.2-p290
vagrant@lucid32:~/ruby-build$ ruby -v
vagrant@lucid32:~/ruby-build$ cd /vagrant
이제 번들러를 인스톨해주고,
vagrant@lucid32:/vagrant$ gem install bundler
vagrant@lucid32:/vagrant$ rbenv rehash
이제 gem 을 인스톨하고,
vagrant@lucid32:/vagrant$ bundle
V8 JavaScript 엔진이 탑재가 안되어 있는 관계로.
Gemfile 에 therubyracer 를 넣고 다시 bundle