Recommendation: Don't use the gem command

11 views
Skip to first unread message

Pistos

unread,
May 24, 2011, 10:15:25 PM5/24/11
to rdbi-devel
Hi.

I was trying to take a look at this project again. Run specs, update
m4dbi, etc. However, when I try to rake test, it dies with:

/home/pistos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/
rubygems.rb:900:in `report_activate_error': Could not find RubyGem
rdbi-driver-mock (>= 0) (Gem::LoadError)

test/helper.rb has:

gem 'rdbi-driver-mock'

Obviously, installing the gem would make the error go away, but I
wanted to suggest not using the gem command, and sticking with require
commands all around. This way, when developing for the project, you
can use -I (capital i) with `ruby` and `rake` to make use of local
development versions of related repos (in this case, rdbi-driver-mock)
when doing whole-project RDBI development.

Having to install gems, whether from local dirty repos or from rubygem
sources, doesn't seem the right way to go.

Thoughts?


Pistos

James Tucker

unread,
May 24, 2011, 10:17:27 PM5/24/11
to rdbi-...@googlegroups.com

Correct.

Kernel#gem should only be used to activate gems when absolutely required.

Mike Pomraning

unread,
May 24, 2011, 11:03:10 PM5/24/11
to rdbi-...@googlegroups.com
On Tue, May 24, 2011 at 9:15 PM, Pistos <rdbi....@purepistos.net> wrote:
test/helper.rb has:

   gem 'rdbi-driver-mock'

...[I] wanted to suggest not using the gem command, and sticking with require
commands all around.

Agreed.

-Mike

Reply all
Reply to author
Forward
0 new messages