Hi all,
A simple trick I want to share with you if you are using Bundler (or rails 3)
It matters if you want to install wirble gem in your workstation but not in your server
Sometimes, you want to include some gem that are not mandatory for your application to run but you want to use in your workstation. E.g wirble, awesome_print etc … or other debugging tools
Just write something like this in your Gemfile
# Gemfile if File.exist?(file = File.expand_path('../myGemfile',__FILE__)) instance_eval(File.read(file)) end
Now in your myGemfile
# myGemfile gem 'wirble' gem 'awesome_print'
That’s all! You can now require ‘wirble’ or ‘awesome_print’ in your rails console


2 comments
Scott Schulthess says:
June 10, 2011 at 14:39 (UTC 2 )
The correct way to do this is to create a development section in your gemfile and put wirble there, then make sure to use the correct bundler commands when doing a deployment.
Hallelujah says:
June 14, 2011 at 12:07 (UTC 2 )
Thanks for the tip.
I did not read all the Bundler and Gemfile specs and docs