Code Monkey home page Code Monkey logo

mapotempo-web's Introduction

Mapotempo Build Status

Delivery optimization with numerous stops. Based on OpenStreetMap and OR-Tools.

Installation

For the following installation, your current working directory needs to be the mapotempo-web root directory.

On Fedora

Install ruby (>2.0 is needed), bundler and some dependencies from system package.

yum install ruby ruby-devel rubygem-bundler postgresql-devel libgeos++-dev

On other systems

Install ruby (>2.0 is needed) and other dependencies from system package. For exemple for Ubuntu: sudo apt-get install ruby2.0 ruby2.0-dev libz-dev libicu-dev build-essential g++ postgresql-server-dev-9.3 libgeos++-dev

It's important to have those installed packages before installing following gems.

Install ruby bundle gem by :

export GEM_HOME=~/.gem/ruby/2.0.0
gem install bundler

All systems

Now add gem bin directory to path with :

export PATH=$PATH:~/.gem/ruby/2.0.0/bin

And finally install gem project dependencies with :

bundle install

Configuration

Default project configuration is in config/application.rb you can override any setting by create a config/initializers/mapotempo.rb file and override any variable. In particular you may need to override Mapotempo::Application.config.trace_cache_dir and Mapotempo::Application.config.optimizer_exec.

Delayed job (background task) can be activated by setting Mapotempo::Application.config.delayed_job_use = true it's allow asynchronous running of import geocoder and optimization computation.

Default configuration point on public OSRM API but matrix computation heavily discouraged on it. So point on your own instance.

Initialization

Check database configuration in config/database.yml and from project directory create a database for your environment with :

As postgres user:

createuser -s [username]

createdb -E UTF8 -T template0 -O [username] mapotempo-dev

createdb -E UTF8 -T template0 -O [username] mapotempo-test

As normal user:

rake db:schema:load RAILS_ENV=development

You can load demo data from db/seeds.rb into database with :

rake db:seed

Running

Start standalone rails server with

rails server

Enjoy at http://localhost:3000

Start the background jobs runner with

./bin/delayed_job run

Running in production

Setup assets: rake i18n:js:export rake assets:precompile

mapotempo-web's People

Contributors

frodrigo avatar fab-girard avatar croussy avatar guillaumeamat avatar hugolpz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.