Skip to content

Instantly share code, notes, and snippets.

@jharjono
Created October 15, 2011 14:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jharjono/1289663 to your computer and use it in GitHub Desktop.
Save jharjono/1289663 to your computer and use it in GitHub Desktop.
EOL Fresh install script for a fresh Ubuntu machine
# make sure all packages and sources are up-to-date
sudo apt-get update
# update system and kernel files as well
sudo apt-get dist-upgrade
# install compiler packages
sudo apt-get install build-essential
# Git
sudo apt-get install git-core
# RVM (Ruby version manager)
sudo apt-get install curl
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
. ~/.bashrc
rvm # test that it works
# Solve openssl problem
sudo apt-get install dselect # (optional) easier look at packages
sudo apt-get install zlib1g-dev
rvm pkg install openssl
# help install readline
sudo apt-get install ncurses-dev libncurses5-dev libreadline-dev libreadline6 libreadline6-dev
# optional, but recommended for developer convenience
rvm pkg install readline
rvm pkg install iconv
# checkout the code
mkdir code
cd code/
# clone read-only master
git clone git://github.com/EncyclopediaOfLife/eol.git
cd eol
# RVM kicks in, *do not* let RVM install Ruby on its own
rvm install ruby-1.8.7-p352 --with-iconv-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --with-readline-dir=$rvm_path/usr
rvm --default use ruby-1.8.7-p352
pushd .
cd ~/.rvm/src/ruby-1.8.7-p352/ext/readline/
ruby extconf.rb -- --with-readline-dir="$HOME/.rvm/usr"
make install
cd ../openssl
ruby extconf.rb -- --with-openssl-dir="$HOME/.rvm/usr"
make install
cd ../iconv
ruby extconf.rb -- --with-iconv-dir="$HOME/.rvm/usr"
make install
# MySQL
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
# Memcached
sudo apt-get install memcached
# libxml2
sudo apt-get install libxml2-dev libxml2 libxslt-dev
# Gems
popd
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
bundle install
# create db tables
cd config
cp database.sample.yml database.yml
cd ..
rake db:create:all
rake db:migrate
rake db:migrate RAILS_ENV=test
rake db:migrate RAILS_ENV=test_master
# load db test data and build solr index
rake solr:start
rake truncate
rake scenarios:load NAME=bootstrap,demo
rake solr:build RAILS_ENV=test
rake solr:rebuild_site_search
rake solr:rebuild_collection_items
# run all tests and hope they all pass
rake
@SeishinX
Copy link

line 77 should be:
rake db:create:all

@jharjono
Copy link
Author

thanks for the correction @ChrisXu!

@DanielZhangQingLong
Copy link

i have a problem, i use ubuntu 12 and gem install bundler when i execute "bundler install" ,it appears an error "An error occurred while installing debugger (1.5.0), and Bundler cannot
continue.
Make sure that gem install debugger -v '1.5.0' succeeds before bundling."

how can I solve it.

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