Problem loading gems from custom directory

Hi,

I would like to store and load gems in/from the documentation repository
of a project I am working on so that users can check and compile the
docs without having to manually install gems.

I came across this advice after some searching but can not manage to get
it working after a number of tests :
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/158644

I do get to install the gem (nanoc in this case) using ‘gem install
nanoc install-dir /myProject/myGems’. But even after adding the
following in my main script


require ‘rubygems’
Gem.path.push(’/myProject/myGems’)

I get this error :
“/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require’: no such file to load – nanoc-3.1.7.gem
(LoadError)”.

Could someone bring some light on this ? Or maybe point me to some
documentation regarding this Gem.path.push ? I could not find any.

THanks in advance.

Best,
Julien

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs