Plugins - Gems

StarAdd to favorites

This is a small plugin that helps with Ruby Gem management for your application. It will automatically include all gem/lib paths into the $LOAD_PATH on startup.

To freeze gems:

  $ rake gems:freeze GEM=tzinfo
  (in /path/to/app)
  rm -rf vendor/tzinfo-0.1.2
  cd /path/to/app/config/../vendor
  mkdir -p tzinfo-0.1.2
  Unpacked tzinfo 0.1.2 to 'tzinfo-0.1.2'
  cd -

Be sure to require them in your environment.rb if you want them available.

  $ script/console
  Loading development environment.
  >> TZInfo
  NameError: uninitialized constant TZInfo
  >> require 'Tzinfo'
  => true
  >> TZInfo
  => TZInfo

You can also freeze specific versions:

  rake gems:freeze GEM=tzinfo VERSION=0.1.2

Rick Olson

http://svn.techno-weenie.net/projects/plugins/gems/

Rails' (MIT)

  • Currently 4.8/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Misc. Enhancements

Tags

Comments

Add a comment
Andrew 24 Nov 2007

I'm trying to use this to freeze the bcrypt-ruby gem. Whenever I try to require 'Bcrypt' I get the following:

MissingSourceFile: no such file to load -- Bcrypt

I changed the require statement to use the whole path, but then another require in the bcrypt library broke... do I have to go through and change every require to have a full path? Or is there some automagical locating done by require that I am missing?

Ian 12 Sep 2007

If you need to freeze two different gem versions (e.g. hpricot for OS x on dev, Hpricot for linux on prod) check out http://agilewebdevelopment.com/plugins/gemswitharchitecture

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?