Project

General

Profile

Actions

Installing the Tapestry application » History » Revision 18

« Previous | Revision 18/47 (diff) | Next »
Madeleine Ball, 08/09/2011 02:39 PM
Adding instructions for making the data directory, changing ROOT_URL to not suggest the "http://" prefix, which shouldn't be necessary


Installing the mypg platform

Install ruby .deb from http://www.rubyenterpriseedition.com/download.html

sudo gem install rails

sudo gem install passenger

sudo /usr/local/bin/passenger-install-apache2-module

Add stuff (as provided by passenger-install) to your conf.d/passenger.conf

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby
RackEnv "development" 

Check out git repo from :pgp-enroll.git to somewhere -- say, /var/www/my.example.freelogy.org

Then execute:

sudo bundle install

If that fails, you might need to fix some dependencies like these ones, then repeat bundle install:

sudo apt-get install libxml2-dev libxslt-dev

Point a virtualhost to the public dir in your git repo

<VirtualHost *:80>
   ServerName my.example.freelogy.org
   DocumentRoot /var/www/my.example.freelogy.org/public
   <Directory /var/www/my.example.freelogy.org/public>
         AllowOverride all
         Options -MultiViews
   </Directory>
</VirtualHost>

Copy config/database.example to config/database.yml and edit to suit. Make sure to select mysql as the database server. Generate a password using pwgen 12 1 or head -c12345 /dev/urandom|md5sum|head -c12;echo. For example:

development:
adapter: mysql
server: localhost
database: mypg
username: mypg
password: c16fbe415d29
timeout: 5000

Copy config/environments/development.rb.sample to config/environments/development.rb and edit to suit. In particular the ROOT_URL (you may skip the "http://" prefix):

ROOT_URL = 'your.vhost.name'

Set up the database:

rake db:setup
rake db:schema:load

Set up data directory (replace USERNAME with the user who owns the GIT directory this code is in, and ROOT_URL matching the one above):
sudo mkdir -p /data/ROOT_URL
sudo chown -R USERNAME:USERNAME /data/ROOT_URL

After you do a git pull, you'll probably want to do

rake db:migrate

to bring your database up to the latest release.

If the Gemfile has changed, you will also have to run

sudo bundle install

Updated by Madeleine Ball over 13 years ago · 47 revisions