Part 3: Ruby Through Rails —Bundler Configuration & Settings

Read details about Bundler configurations, settings and paths. Learn about various Ruby constructs through bundler code.

Sanjiv Kumar Jha's avatarnarutosanjiv


Note: I am currently using ruby-2.1.0 with rvm-1.25.13 and for bundler code, i have used relative path to bundler. On my system, Bundler absolute path is $HOME/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0. You can have different path based on your preferences.

In my previous post, we have learned  how bundler gets started and how it executes various commands (‘install’, ‘exec’) with the help ‘thor’ gem ‘start’ function. We have seen the code below inside the install function of ‘bundler/cli’.

Bundler.definition is defined inside the ‘lib/bundler.rb’ with context as self (i.e. Bundler itself) and it initializes ‘Bundler::Definition’ that can is inside ‘lib/bundler/definition.rb’. I have pasted the code of ‘Bundler.definition’ below.

Bundler.definition (unlock variable)

The variable unlock has one of the three values: nil , true and a hash containing the gem names and gem sources.
While executing command `bundle install`, unlock is not passed and has a value nil but while updating all gems with…

View original post 480 more words

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.