ashbb / green_shoes

Green Shoes is one of the colorful Shoes written in pure Ruby.
Other
204 stars 37 forks source link

Doesn't work on Mac OS X Lion #44

Open samnang opened 13 years ago

samnang commented 13 years ago

I try to use homebrew to follow the instruction from https://github.com/ashbb/green_shoes/wiki/Building-Green-Shoes-on-OSX. But it doesn't work when I run Shoes.show_manual 'English'. I get the following error

LoadError: no such file to load -- /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/ext/hpricot/hpricot_scan
from /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/ext/hpricot.rb:20:in `require_relative'
from /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/ext/hpricot.rb:20:in `<top (required)>'
from /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/shoes/help.rb:6:in `<class:Manual>'
from /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/shoes/help.rb:1:in `<top (required)>'
from /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/shoes/manual.rb:4:in `load'
from /Users/samnang/.rvm/gems/ruby-1.9.2-p180@dev/gems/green_shoes-1.0.273/lib/shoes/manual.rb:4:in `show_manual'
from (irb):2
from /Users/samnang/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'
kotp commented 13 years ago

Same on Ubuntu, Ruby 1.9.2

atomicules commented 13 years ago

I think this is because the included version of Hpricot is for windows only.

Here is a workaround:

Just tried on Fedora 15, Ruby 1.9.2-p290, worked fine.

@ashbb,

Since green shoes is a gem, it would make sense to just have Hpricot as a dependency rather than include it. Would also be worth looking at swopping with Nokogiri

kotp commented 13 years ago

@i5m It indeed works as you describe here as well (Though I didn't need to do the hpricot install, even in this gemset).

atomicules commented 13 years ago

@kotp so you must have already had Hpricot installed?

kotp commented 13 years ago

Yeah, either from my global RVM gemset or the default. I have yet to track it down. Obviously it is installed somewhere/sometime.

Warmest Regards,

Victor H. Goff III 維克多 My GPlus Profile http://bit.ly/rqK71A

ashbb commented 13 years ago

Hi all,

The reason that I include Hpricot binary library files is because gem install hpricot doesn't work on Windows (can't make .so files without C compiler).

But think over again, Green Shoes manual is just one of the Green Shoes apps. So, it may be better to separate it from the green_shoes gem itself. It many be better to make a new gem, e.g. green_shoes_manual gem, and replace Hpricot to Nokogiri.

ashbb

kotp commented 13 years ago

I think the manual may be important enough to 'just run' though. You can conditionally require 'hpricot' or 'hpricot_scan' based on the active OS.

atomicules commented 13 years ago

I've never had any problems with gem install hpricot on Windows as long as using the Ruby Installer versions of Ruby and their DevKit.