Ruby Through Rails PART 2 – Bundler details

narutosanjiv

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

One thought on “Ruby Through Rails PART 2 – Bundler details

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s