Skip to content

Instantly share code, notes, and snippets.

@sandys
Created December 13, 2012 08:22
Show Gist options
  • Save sandys/4274984 to your computer and use it in GitHub Desktop.
Save sandys/4274984 to your computer and use it in GitHub Desktop.
ruby installation on debian 6 vm

aptitude install autoconf automake bison build-essential curl git-core libapr1 libaprutil1 libc6-dev libltdl-dev libreadline6 libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev libtool libxml2-dev libxslt-dev libxslt1-dev libyaml-dev ncurses-dev openssl sqlite3 zlib1g zlib1g-dev

git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv

in .zshenv

export PATH="/usr/local/rbenv/bin:$PATH" eval "$(rbenv init -)"

on cmdline

git clone git://github.com/sstephenson/ruby-build.git cd ruby-build ./install.sh

or git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

rbenv install 1.9.3-p194 rbenv global 1.9.3-p194 rbenv rehash

APP_ROOT=/path/to/current
ENV=production
 
start_unicorn () {
  su - unicorn_user -c "cd ${APP_ROOT} && export BUNDLE_GEMFILE=/path/to/Gemfile && rvm 1.9.3@myproj exec unicorn -D -E ${ENV} -c ${APP_ROOT}/config/unicorn_config.rb"
}

$ bundle install --binstubs=.bundle/binstubs $ ./.bundle/binstubs/rspec spec

$ cat ~/.bundle/config

BUNDLE_PATH: .bundle BUNDLE_BIN: .bundle/binstubs

dpkg-reconfigure locales deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian squeeze main deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian squeeze main

aptitude purge sendmail-base sendmail sendmail-cf sendmail-doc bind9

edit /etc/syslog.conf and uncomment cron to get cron logs

bundle config --global bin bundle_bi bundle config --global path .bundle_gems bundle config --global shebang ruby-local-exec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment