Ruby Through Rails PART 3 – Bundler configuration and settings

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

narutosanjiv


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 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 )

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

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