Skip to content

Latest commit

 

History

History
127 lines (99 loc) · 4.62 KB

INSTALL.md

File metadata and controls

127 lines (99 loc) · 4.62 KB

Chouette2 External Dependencies

Install the Chouette IEV 3.X Web Service see how to

The next steps assume that :

  • a Chouette IEV Web Service is running (on localhost, port 8080)
  • a Postgres database exists (chouette2 on localhost, port 5432) with a postgres user (chouette, with password chouette)

On Debian/Ubuntu/Kubuntu OS : assumes that the depot contains the correct version

sudo apt-get install libpq-dev git unzip libgeos-dev proj-bin libproj-dev make

If your Linux distribution doesn't publish an RVM package, install RVM from sources

Install ruby 2.1.x

rvm install ruby-2.1.x
rvm --default use 2.1.x

Install bundler 1.10.x

gem install bundler -v 1.10.x

Chouette2 Installation

On Debian, chouette can also be installed as a package : see debian packages

Install web application

Get git source code :

cd
git clone -b V3_2 git://github.com/afimb/chouette2
cd chouette2

Download gem librairies

bundle install

Add the PostGIS extension to your database

RAILS_ENV=production bundle exec rake db:gis:setup

Update the database schema

RAILS_ENV=production bundle exec rake db:migrate

Prepare the static resources (assets)

RAILS_ENV=production bundle exec rake assets:clobber assets:precompile

Chouette2 Configuration

Configure for Generating URLs in Action Mailer Views.

Configure asset access (Must be True if you use Webrick, or False if you use Apache or Nginx).

Configure SMTP settings.

Configure the e-mail address visible on the e-mail sent when a user registers, re-initialises its password, ...

Configure Rails secret key.

Configure the Chouette IEV Web Service url.

Configure the Google Analytics Key.

Configure the IGN Géoportail Key.

Configure the way Chouette2 sends e-mail.

Configure OSRM Backend URL

Run Chouette2

Launch the task if you want to send mail asynchronously (See previous section to de-activate it)

RAILS_ENV=production bundle exec rake jobs:work

This task may be added in the system start-up configuration

Launch the Rails server with WEBrick ( default RoR web server, note: Webrick runs on default port 3000)

RAILS_ENV=production bundle exec rails server

This task may be added in the system start-up configuration. Instead of using WEBrick, the Rails application may be deployed on Phusion Passenger with an Apache or NGinx front-end, to make server faster and more robust.

Apache like NGinx can serve static resources, so change parameter serve_static_assets to false in production.rb

Test Chouette2

bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake spec