Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
/ chouette2 Public archive

chouette2 is a Ruby on Rails web app for editing, reading, validating and exchanging Public Transport datas. To be installed together with https://github.com/afimb/chouette

License

Notifications You must be signed in to change notification settings

afimb/chouette2

Repository files navigation

Chouette2 Build Status Dependency Status Code Climate

Chouette2 is an open source web project in Ruby/Rails to edit and view transport offer. It's designed as an SaaS platform and can :

It uses java library from another git project to import and export various transport data chouette

Feel free to test and access to the free SaaS web site at http://appli.chouette.mobi. Two types of access are granted :

  • A demo organisation with a set of data
  • Create your own organisation : Must follow the link "Sign up" ("S'inscrire")

Release Notes

The release notes can be found in CHANGELOG file

Requirements

This code has been run and tested on Travis with :

  • Ruby 1.9.3
  • Java 7
  • Postgres 9.x
  • Proj 4.8.0

External Deps

If Linux distribution does't publish RVM package, install RVM from sources

Install ruby 1.9.3

rvm  install ruby-1.9.3-p448
rvm --default use 1.9.3-p448

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

sudo apt-get install postgresql
sudo apt-get install libpq-dev
sudo apt-get install openjdk-7-jdk
sudo apt-get install git
sudo apt-get install unzip
sudo apt-get install proj-bin
sudo apt-get install libproj-dev
sudo apt-get install make

Installation

Install chouette-gui-command to import, export and validate transport offer, Assume Linux user is myuser and its group mygroup (that user is the one who starts Rails server)

sudo mkdir -p /usr/local/opt/chouette-command/
sudo chown -R myuser:mygroup /usr/local/opt/chouette-command/
cd /usr/local/opt/chouette-command/
wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.4.1/chouette-gui-command-2.4.1.zip
unzip chouette-gui-command-2.4.1.zip
cd chouette-cmd_2.4.1
sudo chmod a+w .

Install web application

Get git source code :

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

Download gem librairies

gem install bundler
bundle install

Create [Postgres database user] (./doc/install/postgresql.md)

Create database and its schema

RAILS_ENV=production bundle exec rake db:create apartment:migrate

Prepare static resources (assets)

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

The next step assume default path defined by following settings in file production.rb are unchanged

  • ImportTask.root
  • Export.root

Create directories

sudo mkdir -p /var/lib/chouette/imports
sudo mkdir -p /var/lib/chouette/exports
sudo chmod a+x /var/lib/chouette/imports /var/lib/chouette/exports

Configuration

Configure for Generating URLs in Action Mailer Views.

Configure SMTP settings.

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

Configure IGN Géoportail Key.

Configure Google Analytics Key.

Run

Launch the task to import and export asynchronously

RAILS_ENV=production bundle exec rake jobs:work

This task may be added in system start up configuration

Launch rails server with WEBrick ( default RoR web server, note: running on default port 3000)

RAILS_ENV=production bundle exec rails server

This task may be added in system start up configuration. Instead of using WEBrick, Rails application may be deployed on Pushion 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

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

More Information

More information can be found on the project website on GitHub. There is extensive usage documentation available on the wiki.

API Documentation

The description of the restful API is described in :

License

This project is licensed under the CeCILL-B license, a copy of which can be found in the LICENSE file.

Release Notes

The release notes can be found in CHANGELOG file

Support

Users looking for support should file an issue on the GitHub issue tracking page, or file a pull request if you have a fix available.

About

chouette2 is a Ruby on Rails web app for editing, reading, validating and exchanging Public Transport datas. To be installed together with https://github.com/afimb/chouette

Resources

License

Stars

Watchers

Forks

Packages

No packages published