How do I get gems into XCode/MacRuby environment?
I'm past the Hello World tutorial, and want to try something useful but I cannot seem to access my gems from within the XCode/MacRuby environment. rubygems is there, as is pp; but not, for instance hpricot. $gem list --local ... hpricot (0.8.1, 0.6.164) ... rack (1.0.1) rails (2.3.5, 2.3.4, 1.2.6) ... Within rb_main.rb: puts "Loading rubygems... #{require 'rubygems'}" #=> true puts "Loading pp... #{require 'pp'}" #=> true but puts "Loading hpricot... #{require 'hpricot'}" gets me "no such file to load -- hpricot (LoadError)" Any hints? Do I need to hunt down the full path?
Try using "macgem". All of the MacRuby binaries are prefixed with "mac-" (macruby, macirb, macri, etc.) On Thu, Apr 14, 2011 at 1:44 AM, Paul Davis <peedeemail@gmail.com> wrote:
I'm past the Hello World tutorial, and want to try something useful but I cannot seem to access my gems from within the XCode/MacRuby environment. rubygems is there, as is pp; but not, for instance hpricot.
$gem list --local ... hpricot (0.8.1, 0.6.164) ... rack (1.0.1) rails (2.3.5, 2.3.4, 1.2.6) ...
Within rb_main.rb:
puts "Loading rubygems... #{require 'rubygems'}" #=> true puts "Loading pp... #{require 'pp'}" #=> true
but
puts "Loading hpricot... #{require 'hpricot'}"
gets me "no such file to load -- hpricot (LoadError)"
Any hints? Do I need to hunt down the full path? _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
I cannot help with the gems stuff but I am not sure if MacRuby supports Rails yet. It didn't a few releases ago and I don't recall anything in the more recent release notes about it. Dave. On 14 Apr 2011, at 06:44, Paul Davis wrote:
I'm past the Hello World tutorial, and want to try something useful but I cannot seem to access my gems from within the XCode/MacRuby environment. rubygems is there, as is pp; but not, for instance hpricot.
$gem list --local ... hpricot (0.8.1, 0.6.164) ... rack (1.0.1) rails (2.3.5, 2.3.4, 1.2.6) ...
Within rb_main.rb:
puts "Loading rubygems... #{require 'rubygems'}" #=> true puts "Loading pp... #{require 'pp'}" #=> true
but
puts "Loading hpricot... #{require 'hpricot'}"
gets me "no such file to load -- hpricot (LoadError)"
Any hints? Do I need to hunt down the full path? _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On 14 Apr 2011, at 08:35, Dave Baldwin wrote:
I cannot help with the gems stuff but I am not sure if MacRuby supports Rails yet. It didn't a few releases ago and I don't recall anything in the more recent release notes about it.
Dave.
If you decide to distribute your application to someone other than you, you're going to want to bundle the gems with your application. Have a look at macruby_deploy :-) - Rob
participants (4)
-
Dave Baldwin
-
Joshua Ballanco
-
Paul Davis
-
Rob Gleeson