Veerasundaravel's Ruby on Rails Weblog

September 22, 2010

Bundler: Best way to manage your Gems

Bundler Gem

As the name itself will specify the purpose of it. Bundler gem is used to bundle all of your required ruby gems.

The bundler allows the specification of all dependencies in a separate place from the application itself. You can specify the required version of gems and its entire set of dependencies.
So while deploying your application in a server no need to install the gem from Rubyforge or RubyGems.org etc.

Steps to follow:

1. At the root of your application, run gem install bundler

2. Create a Gemfile in the root of your application

3. Add dependencies to your Gemfile. like gem “rspec”, 1.2.3

4. At the root, run bundle install. It will install all the gems which you specified in Gemfile from the remote system. And it will create a file called Gemfile.lock. The purpose of Gemfile.lock is to get the list of gems installed and its dependencies in your app.

5. And now run bundle package. It will make a copy of your installed gems into your application path vendor/cache. It will more helpful when you are deploying your app in any other server. Cos after running bundle package, your application will look gems into vendor/cache instead of remote systems.

For more details:

http://gembundler.com/
http://gembundler.com/rails23.html
http://yehudakatz.com/2009/11/03/using-the-new-gem-bundler-today

Advertisements

2 Comments »

  1. i see what you did there

    Comment by weight — October 5, 2010 @ 7:20 pm

  2. You can edit audio files with audacity.

    Comment by audacity download — October 21, 2010 @ 9:09 pm


RSS feed for comments on this post. TrackBack URI

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

%d bloggers like this: