Reputation: 9786
So when you have bundler install a gem from github, it doesn't actually get installed, does it? gem list
won't list those gems.
Which brings me to my conundrum: I'm working on a script that wants to use one of these gems that don't actually get installed. Now what? I could check out the github repo manually and build/install the gem, but now I've got one version being managed by bundler and another that's not. I could point the script to the gem directory in ~/.rvm but that's not a great idea when it comes time to go to production.
I'm trying to find a bundler command that will make any gems from github "register" with rubygems, but nothing so far. Any suggestions?
Upvotes: 3
Views: 771
Reputation: 3000
rubygems-bundler is a gem that addresses this issue. If it is installed on your system, you shouldn't need any extra code in your project. It may need to be installed as @global, so, to sum it all up:
$ rvm use @global
$ gem install rubygems-bundler
And then, to get back to the rvm version you were using:
$ rvm use @
Upvotes: 0
Reputation: 9786
Ironically this is the same answer as a previous question I had, which I answered myself with this same solution (although it was a little different in bundler 0.9):
require 'rubygems'
require 'bundler/setup'
require 'hiddengem'
bundler/setup
makes the bundler "stack" available just as if they were regularly installed gems. Sooner or later I'll remember this. :)
Upvotes: 2