Part 2: Ruby Through Rails — Bundler Details

Learning Ruby Through Rails is fun! Here is Part 2

Sanjiv Kumar Jha's avatarnarutosanjiv

In these tutorial, I am going discuss how Bundler works in a Rails application.

What is bundler?

Bundler is a gem for managing dependencies of Ruby (and Rails) applications. While using RVM, Bundler is always installed in global gemset. For example, on my machine, bundler is installed inside folder /home/sanjiv/.rvm/gems/ruby-2.0.0-p247@global/gems/.  Usually common gems are installed in @global gemset as they may be required into multiple applications. Now, lets see what’s inside the bundler binary.

What is Signal.trap?

Operating systems send various signals to running processes. Some signals can be trapped by code. In the code above, Signal.trap catches the “Interrupt” signal when the user presses Ctrl-c to stop the process. It then exits the bundler with an exit status of 1. Here is the list of signals that can by caught by the trap function.

When we require ‘bundler’, the lib/bundler.rb inside bundler gem get loaded and a lot of modules…

View original post 623 more words

[Field Visit] Berendina MFI and UnitedProsperity improves the quality of live in Sri Lanka.

In the first week of February, Sethu and I were on a field visit to Sri Lanka that was organized by Berendina Micro Finance Institution (BMI) and UnitedProsperity. Little did we know what's in store for us but we have come back home changed and inspired. The visit agenda was to study the impact of the … Continue reading [Field Visit] Berendina MFI and UnitedProsperity improves the quality of live in Sri Lanka.