alexis boissonnat.

ab.

#Ruby

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

I started using the Ruby language when I discover Ruby on Rails.

TticTtac

October 01, 2015
A personal time tracker

With my new consultancy activity I need to track my time with precision. I also have the need to be able to report my activity to all the different people around me.

In a few days I wrote a first working version of TticTtac which handles my primary needs. It’s up on heroku, absolutly free, give it a try !

We also manage a Trello board, don’t hesitate to drop me an email to be part of it if you want to see someday your favorites features in TticTtac.

tticttac

Resources

You can give a try to here tticttac.herokuapp.com

Technologies

Ruby, Ruby on Rails, Jquery, Bootstap, Github, Heroku

Alcatra

Jun 2015 - Now
Characterization of housings' accessibility

ALCATRA is an application which allows a lessor to characterize the accessibility for the housings, the common areas and the buildings according to a ranking DPE like (Classes A to F) based on five disabilities: seniors, wheelchair, auditory, visual and cognitive.

The key of this application stands in a mechanism allowing experts to build complex dynamic decision trees. I am in charge of the whole development process of the application from the conception to the deployment.

The first release has been deployed in Oct. 15th, 2015. I am now focused on the mobile app development (iOS, Android).

Resources

The application is available here: www.alcatra.fr, but only for our customers.

Technologies

Ruby, Ruby on Rails, Javascript, JQuery, SASS, Bootstrap, Git, Bamboo, Capistrano, GitLab, Trello

Deploy RoR application on Apache with Capistrano

May 13, 2015

This tutorial assumes that you already have a working installation of an Apache server.

Install Phusion Passenger

Phusion Passenger has been by far the easiest way I’ve found for managing multiple Rails application instances on top of either Apache or Nginx. It comes as a gem and has custom modules for both major web servers.

# Install gem
$> gem install passenger
# Install passenger for apache2 (then follow the instructions)
$> passenger-install-apache2-module

Then you will need to update your apache configuration (as in the passenger instructions).

First, create a file called /etc/apache2/mods-available/passenger.load and input the following code :

# /etc/apache2/mods-available/passenger.load
LoadModule passenger_module /home/boissonnat/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-4.0.59/buildout/apache2/mod_passenger.so

Second, create a file called /etc/apache2/mods-available/passenger.conf and input the following code :

# /etc/apache2/mods-available/passenger.conf
<IfModule mod_passenger.c>
  PassengerRoot /home/boissonnat/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-4.0.59
  PassengerDefaultRuby /home/boissonnat/.rbenv/versions/2.1.5/bin/ruby
</IfModule>

Then, enable the passenger module in Apache and restart the server.

$> sudo a2enmod passenger
$> sudo service apache2 restart
# Check passenger is activated :
$> apache2ctl -t -D DUMP_MODULES

PostgreSQL

Last but not least, you will need a DB engine. I mainly use PostgreSQL. Here is the installation process.

# install postgreSQL
$> sudo apt-get install postgresql-9.3
# Set the default password
$> sudo -u postgres psql postgres
\password

Capistrano

First create and init a new remote on your server

Capistrano needs git to update your code source. You can use any git repository as it is accessible from your server. Sometimes you could have a repository inside your local network and a server outside this network. In this case, your server will not be able to pull your code source. You can still create a git repository on your server, add it as a remote and push to it for capistrano. Here is how :

On server

# Server side
# Create a folder with the .git extension
$> mkdir myapp.git
# Init a bare git repository
$> cd myapp.git
$> git init --bare

On local

# Client side
# Note here we call this new remote 'preprod'
$> git remote add preprod bob@your.server:/somewhere/myapp.git
# Then push your branch (use to the preprod) to this new repository
$> git push preprod master

Capify your application

Add this following code into your Gemfile

group :development do
    gem 'capistrano'
end

And then :

$> cd /path/to/your/app
$> bundle

And finally :

$> cd /path/to/your/app
$> cap install

Capistrano settings

Capistrano is very well documented. By following the comments, first edit your /config/deploy.rb and then your specific environments settings in config/deploy/my_env.rb

Setup Apache

You need to create and setup permissions for the folder which will be used to deploy your app.

# Create the folder
$> mkdir /var/www/myapp
# Set the group to www-data (the apache group)
$> sudo chgrp -R www-data /var/www/myapp
# Set the user to your deployer user
$> sudo chown -R yourdeployer /var/www/myapp
# Allow group to update the folder
$> sudo chmod -R 775 /var/www/myapp

Then you need to create a virtual host to your current folder. Create a new file called myapp.conf in /etc/apache2/site-available

$> touch /etc/apache2/site-available/myapp.conf
$> nano /etc/apache2/site-available/myapp.conf
<VirtualHost *:80>
        ServerName www.yourhost.com
        # In case of several virtual host based on path :
          # ServerName IP
          # ServerPath /path/
        DocumentRoot /var/www/myapp/current/public
        <Directory /var/www/myapp/current/public>
                # This relaxes Apache security settings.
                AllowOverride all
                # MultiViews must be turned off.
                Options -MultiViews
                # Uncomment this if you're on Apache >= 2.4:
                Require all granted
        </Directory>
</VirtualHost>

Don’t forget the .conf extension. Without this extension Apache is not able to treat it.

Finally, you need to activate your site :

$> sudo a2ensite myapp
# And reload apache
$> service apache2 reload

Deploy your application

$> cd /path/to/your/app
$> cap production deploy

Install Ruby on Rails on Ubuntu server

May 12, 2015

This article shows how to install ruby and rails on Ubuntu through rbenv

Install ruby

We are going to install Ruby through rbenv.

Install some dependencies for Ruby

The following set of dependencies just below contains everything you need to run Rails application on Ubuntu server. Look at them carefully.

$> sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties

Install rbenv

We prefer here to use rbenv instead of RVM to its permissions management. Let’s clone rbenv in home_dir

$> git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

Now we will add ~/.rbenv/bin to our $PATH for access to the rbenv command-line utility.

$> echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

Add rbenv init to your shell to enable shims and autocompletion.

$> echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Install ruby-build

Installing ruby-build as an rbenv plugin will give you access to the rbenv install command.

$> git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Install Ruby versions

rbenv offers some useful command like list or install. Install the ruby version that suits you as simple as that :

# list all available versions:
$> rbenv install -l
# install a Ruby version:
$> rbenv install 2.1.5

Set the global version of Ruby

$> rbenv global 2.1.5

Installs shims for all Ruby executables known to rbenv (i.e., ~/.rbenv/versions//bin/). Run this command after you install a new version of Ruby, or install a gem that provides commands.

$> rbenv rehash

Install rails

Now Ruby is installed, you can install rails by typing :

# rails installation
$> gem install rails

# Or installing a specific version
$> gem install rails --version 4.2.0

# Activate rails executable
$> rbenv rehash

# Check rails installation (and version)
$> rails -v
Rails 4.2.0

Note

You don’t need to specify --no-ri --no-rdoc every time you install a gem in production: just add gem: --no-rdoc --no-ri to ~/.gemrc (create that file if it doesn’t already exist) and don’t worry about ri or rdoc again in production.

Wy-T-iwyg

May 01, 2015
Markdown document editor based on Rails and AngularJS

wy-T-iwyg stands for What You Type is What You Get. This is a basic document sharing platform, built over a powerful markdown editor with a full real-time rendering.

The front-end is entirely managed with AngularJS (giving a try to AngularJS was actually my main motivation for working on this project) just after the boring registration stuff, while Ruby on Rails takes care of the business model.

wytiwyg

I’m thinking about dropping AngularJS and transform this POC in ruby gem for markdown edition.

Resources

You can give a try here wytiwyg.herokuapp.com

Technologies

Ruby, Ruby on Rails, AngularJS, Bootstap, Github, Heroku

CEQ

Oct 2014 - Now
EcoDistricts evaluation campaign

France has been choosen to welcome the next 2015 climat conference.

One objective of this conference will be to show the positive impact of energy efficency wihtin a neighbourhood. In order to achieve this goal, the CSTB has developed a complete methodology allowing the EcoDistrict evaluation. A web application has been developed in order to hide the methodology’s complexity and favor its adoption by local collectivities.

I was in charge of the development team. We have constantly focused our energy on improving the user experience. With agility, we developed the application in parallel to the methodoly definition to help experts work on concrete cases. ‘Keep it simple’ and ‘Don’t repeat yourself’ were our key success factors to be able to refactor everywhere anytime.

Resources

Some references about our work and the methodology:

Technologies

Ruby, Ruby on Rails, Javascript, JQuery, ReactJS, SASS, Bootstrap, Git, Bamboo, Capistrano, GitLab, Trello

EasyJek

January 01, 2014
Tool set for Jekyll file generation

I’m a big fan of Jekyll. I’ve actually built this website on it. EasyJek is a command line tool which helps you to easily create your jekyll resources through a single command line.

Resources

Docs are available on GitHub

Technologies

Ruby, Thor

All u track

October 01, 2013
A simple solution for issue tracking

I’m a huge fan of GitHub : it’s fast, slick, easy and so much more… But for the majority of my customers, using GitHub to manage the backlog is overkill. These are the two main ideas behind All-U-Track which offers an issue tracking tool based on the GitHub simplicity.

allutrack

This app was my first trip with Ruby on Rails, and it was love at first sight !

Resources

You can give it a try here allutrack.herokuapp.com

Technologies

Ruby, Ruby on Rails, Bootstap, Github, Heroku

Prathic-ERP

Mar 2013 - Now
Product referencing portal to improve building accessibility for disabled people

Prathic-ERP is a platform which references products that meet the needs of disabled people in institutions welcoming visitors. This site was created on an initiative of the Ministerial Delegation for Accessibility. The Information and Advice Centre for Assistive Technology (CEP-CICAT) with its operation by managing memberships manufacturers and organizing the publishing committee. A complex publishing workflow was set up to ensure the quality of the publications and the relevance of the products.

On top of this complex workflow, we built simple interfaces both for manufacturers and visitors. I was deeply involved in every part of the project, from the product definition to the deployment. I managed the development process with agility and lead the development team. Since 2013, we have released three major versions.

Resources

You can take a tour at: www.prathic-erp.fr

Technologies

Ruby, Ruby on Rails, Javascript, JQuery, SASS, Bootstrap, Git, Bamboo, Capistrano, GitLab, Bamboo, Trello

IDEAS

Sept 2012 - Oct 2015
Intelligent Neighbourhood Energy Allocation & Supervision

IDEAS “Intelligent Neighbourhood Energy Allocation & Supervision” is a R&D project supported by the European Commission, focused on the development and operation of energy positive neighbourhoods. In addition, IDEAS focuses on the economic and environmental benefits of doing so.

IDEAS develops and validates different tools and business models needed for demonstrating the cost-effective and incremental implementation of an energy positive neighbourhood. The neighbourhood energy management tool enables intelligent energy trading and operation of equipment and buildings along with local energy generation and storage.

My team was in chagre of the development of user interfaces that engage communities and individuals in the operation of Energy Positive Neighbourhoods. I was responsible for the whole development process from conception to deployment.

Resources

Technologies

Ruby, Ruby on Rails, Javascript, AngularJS, Bower, Grunt, Heroku, Git, GitLab, Trello