Skip to content
Ensemble app for Mirador, Epinal (France) based non profit
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Fix -undefined method avatar for nil:NilClass- error in registrations… Mar 19, 2018
config Change default_recipient Aug 29, 2018
db #51 add tarteaucitron.js to manage cookies Mar 5, 2018
docs Create base factories for spec Feb 7, 2018
lib #51 delete 2 years inactive users Mar 5, 2018
public Add lexical Mar 12, 2018
vendor/assets project init Feb 15, 2017
.gitignore #12 Base production configuration Dec 29, 2017
.rspec base admin Feb 15, 2017
.rubocop_todo.yml Replace will_paginate with kaminari Nov 25, 2017
.travis.yml Update travis.yml Feb 13, 2018
Capfile #12 Base production configuration Dec 29, 2017
Gemfile.lock Update readme and licence Feb 8, 2018 #12 Add delayed job and daemons Feb 12, 2018 Update icons and add favicons Feb 13, 2018
Rakefile Running rubocop in auto-correct mode Jun 26, 2017 Running rubocop in auto-correct mode Jun 26, 2017
docker-compose.yml #2 Add validations and city to users Dec 2, 2017
package.json #24 event stats Mar 1, 2018
yarn.lock #24 event stats Mar 1, 2018


Website to share our worlds - "Partageons nos monde"

Ensemble is a website that makes people from different cultures meet and make things together.

Build Status

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. -> TODO


  • ruby 2.4.2
  • rails 5.1.2
  • postgresql


With Docker

You need first to have docker & docker-compose installed.

cp config/database.docker.yml config/database.yml

# you may have to start docker commands with `sudo` (depending on how you did install docker)

# build app via docker compose
docker-compose build

# on first install, create the database, apply migrations and data seeds
docker-compose run web rake db:setup

# you may need to install yarn packages
docker-compose run web yarn

docker-compose up
# Ctrl + C to exit

With the standard configuration

You need first to have postgresql installed and running on your OS

git clone
cd rails-starter
bundle install
yarn install

Database configuration :

cp config/database_example.yml config/database.yml
# Update database.yml to cope with your own database connection credentials
sudo -i -u postgres
create role XXX with createdb login password 'XXX';
# Ctrl + D to exit
bin/rake db:setup
bin/rake db:seed
rails server

Your website should be accessible at localhost:3000.


Email notifications are caught by MailCatcher in development. Install it globally (outside of your project folder) if you haven't yet : gem install mailcatcher

Start the service outside of your project folder : mailcatcher

Then, open your web browser at localhost:1080 to access the MailCatcher interface.


With Docker

If you had a standard rails application and have to shut down a few services to have docker run :

# stopping mailcatcher
lsof -i :1080
kill [mailcatcher PID]
# stopping postgresql
sudo service postgresql stop 

Start the dev server

docker-compose up

Application is available at localhost:3000. Mailcatcher is available at localhost:1080.

Start a rails console in another terminal

docker-compose run web rails console

Stop the application and remove all the containers

docker-compose down 

volumes defined in docker-compose.yml are persisted

Installing dependencies

The app uses bundler as ruby dependencies manager and yarn as a javascript dependencies manager.

Update the gems after editing the Gemfile

docker-compose run web bundle install
docker-compose up --build

For javascript

# add to 'dependences' group
docker-compose run web yarn add <package-name>

# add to 'devDependencies' group
docker-compose run web yarn add <package-name> --dev

With the standard configuration

This project uses yarn as a javascript dependencies manager.

# add to 'dependences' group
yarn add <package-name>

# add to 'devDependencies' group
yarn add <package-name> --dev

Exemple : yarn add jquery

Then, in app/assets/javascripts/, add #= require jquery

Foreman vous permettra de démarrer serveur et delayed job à la fois

foreman start -f       

Running the tests

rake db:test:prepare


RAILS_ENV=test rake db:setup RAILS_ENV=test bin/rake db:seed bundle exec rspec

The project could clearly have more tests. Don't hesitate to contribute, I'll be happy to help !

Continuous Integration

There's a .travis.yml file to integrate with Travis CI.

Break down into end to end tests

Explain what these tests test and why -> TODO

And coding style tests

  • rubocop : based on ruby style guide, but relaxed. The aim is first to get rid of rubocop_todo.yml, then go toward stricter style guide if needed.
  • bullet : config in config/environments/development.rb


  • don't forget to change Admin password in production if you run the seeds.

Built With


Please read for details on our code of conduct, and the process for submitting pull requests to us. -> TODO


We use SemVer for versioning. For the versions available, see the tags on this repository. -> TODO



This project is licensed under the AGPL 3.0 License - see the file for details


CSS style rules :

a parent can effect styles on its (direct) children only outside the border of the component. That means properties related to positioning and dimensions (e.g. position, margin, display, width, float, z-index etc) are OK, while properties that reach inside the border (e.g. border itself, padding, color, font etc) are a no-no.


Yarn and font-awesome


Due to sass-rails helper font-url, couldn't find for now an other way to have it work than :

yarn add font-awesome

Copy node_modules/font-awesome/fonts/ to app/assets/fonts. Add @import "font-awesome/scss/font-awesome" in app/assets/stylesheets/administration.sass.

Change node_modules/font-awesome/scss/_path.scss to :

@font-face {
  font-family: 'FontAwesome';
  src: font-url('fontawesome-webfont.eot?v=#{$fa-version}');
  src: font-url('fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
    font-url('fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
    font-url('fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
    font-url('fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
    font-url('fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
//  src: font-url('FontAwesome.otf') format('opentype'); // used when developing fonts
  font-weight: normal;
  font-style: normal;


Create app/assets/stylesheets/shared/fa-font-path-override.sass :

$fa-font-path:  "font-awesome/fonts/" !default

Add it in your sass manifest, before font-awesome :

@import "shared/fa-font-path-override"
@import "font-awesome/scss/font-awesome"

source :

If problems in prod :

End writing open source docs

  • Open source license : MIT, Apache 2.0, and GPLv3
  • README :
    • What does this project do?
    • Why is this project useful?
    • How do I get started?
    • Where can I get more help, if I need it?
  • Contributing guidelines
    • How to file a bug report (try using issue and pull request templates)
    • How to suggest a new feature
    • How to set up your environment and run tests
  • Code of conduct

Rails Templates resources


-> Vérifier la présence de "TODO" dans le code

  • régler le slideToggle 'open' du submenu


Receive sms in dev thanks to ngrok

./ngrok http 3000

Then configure twilio phone number with


Clear down the old Containers and Images

Delete all containers

docker rm $(docker ps -a -q)

Delete all images

docker rmi $(docker images -q)


Port 5432 allocated

Bind for failed: port is already allocated

Solution :

sudo service docker restart


You can’t perform that action at this time.