I agree with Eloy, I'm not using rubygems either. Just load manually what you vendored. - Matt On Fri, Mar 27, 2009 at 10:20 AM, Eloy Duran <eloy.de.enige@gmail.com>wrote:
Hi,
Have you included the Gems directory in your xcode project so that it copies the complete dir when building? This probably then tells you that the dir does not exist "p File.exist?(File.expand_path('../Gems', __FILE__))".
Second, are you sure you actually need rubygems if you are already vendoring? Removing rubygems from the dependencies will really boost up the load time of your application. So I would do everything to remove it as a dependency. In the best case scenario you only need to do something like (untested code):
Dir.glob(File.expand_path('../Gems/*', __FILE__)).each do |gem| $LOAD_PATH.unshift File.join(gem, 'lib') end
require "mechanize"
- Eloy
On 27 mrt 2009, at 17:57, Thiago Jackiw wrote:
Do I have to do anything special to pack gems inside my application's
folder? The following isn't working when I require the gems inside of my 'Gems' folder:
# rb_main.rb ENV['GEM_HOME'] = File.dirname(__FILE__) + '/Gems' require 'rubygems' require 'mechanize'
`require': no such file to load -- mechanize (LoadError)
If I do the above in IRB it works just fine.
The 'Gems' folder contains the following structure:
Gems - cache - doc - gems - mechanize-0.9.2 - specifications - mechanize-0.9.2.gemspec
Thanks, and I'm using MacRuby 0.4.
-- Thiago Jackiw _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel