4

I am running rails 2.3.10 with bundler. I use rvm, in global gemsets usually I put the gems useful for the irb. By default I had these there: map_by_method, what_methods, ap, net-http-spy, hirb, looksee, pp, wirble.

When I start irb, the gems it needs are avalaible for it, and the things look as they should. However, when I start script/console, it cannot reach the gems in the current rvm gemset only those which are defined in Gemfile. I get message no such file to load -- map_by_method. Obviously I do not want to put those irb specific files to my Gemfile.

Do you know some way, how to convince script/console to use also gems outside bundler?

fifigyuri
  • 5,771
  • 8
  • 30
  • 50

2 Answers2

1

bundler will never use any gem that is not defined in the Gemfile. If those gems are for development use only consider adding them to the Gemfile in a group called :development

ffoeg
  • 2,336
  • 1
  • 14
  • 13
  • Sounds like this is just a 'no'. There should be a way. For instance when you want to load a console to the production environment but want to load 'hirb'. – Kevin May 18 '11 at 14:25
  • not that I've seen. If it aint in the Gemfile, too bad so sad. – ffoeg Jul 17 '11 at 19:57
0

You can hand-require gems from within script console if you need them:

$ script/console
=> require 'rubygems'
=> require 'mygem'
=> include 'MyGem::Stuff'
Taryn East
  • 27,486
  • 9
  • 86
  • 108