Martin,
On Sun, Jul 1, 2012 at 8:51 PM, Martin Jöhren <
m.jo...@gmail.com> wrote:
> I'm trying to add a locally installed gem into a Vagrantfile and fail:
>
> Vagrantfile:
>
> ...
>
> require 'fog'
> ...
>
>
> Error:
>
>
> `require': cannot load such file -- fog (LoadError)
>
> How do I fix that? I mean, I found out that Vagrant comes with its own
> embedded stuf, so I got it working by editing the vagrant.gemspec in the
> source code folder of vagrant and inserting s.add_dependency "fog", "~>
> 1.4.0" and rebuild everything, but there must be a better solution like
> linking to my locally installed gems. I'm quite new to ruby so please be
> gentle ;)
You're very right. Vagrant has its own isolated install so that your
rubygems don't show up in the Vagrantfile. The easiest way to do this
at the moment is to use `vagrant gem`:
`vagrant gem install fog`
This will install fog into Vagrant's private gem repo.
However, `vagrant gem` may disappear in the future, but I'll think of
a better way to provide this at some other time. For now, this works.
Best,
Mitchell
>
>