Skip to content

Install on Ubuntu 14.04

Martin Vicián edited this page Jan 16, 2016 · 6 revisions

RVM

sudo apt-get update
sudo apt-get install curl
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
# Or if it fails
curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import -
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm requirements
apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
apt-get install libgmp-dev

Ruby

rvm install ruby-2.3.0
gem install rails
gem install bundler

MongoDB

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo sh -c "echo deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen >> /etc/apt/sources.list.d/10gen.list"
sudo apt-get update
sudo apt-get install mongodb-10gen

Redus

sudo apt-get install redis-server

Git repository

sudo apt-get install git
git clone https://github.com/vician/jizdoteka.cz
cd jizdoteka.cz
bundle install

Init

cp config/settings/local.rb.example config/settings/local.rb
vim config/settings/local.rb
apt-get install nodejs
RAILS_ENV=test rake db:mongoid:create_indexes
rake db:mongoid:create_indexes

Run

redis-server &
TERM_CHILD=1 QUEUES=* rake resque:work &
rails s

Apache temporary fix

ProxyPass / http://localhost:3000 retry=0
ProxyPassReverse / http://localhost:3000

Nginx temporary fix