Ruby Through Rails PART 2 – Bundler details

Learning Ruby Through Rails is fun! Here is Part 2


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


About Gautam Rege

Rubyist, Entrepreneur and co-founder of Josh-Software - one of the leading Ruby development shops in India.
This entry was posted in General. Bookmark the permalink.

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s