FWIW,
Here's how I deal with gems. One, I don't "install" shoes on my Linux
box, I build from git and run it from the command line of a terminal
app. That might not match what you want.
There's a switch -g (or --gem ) on the shoes command line that allows
gem commands to be passed and Shoes seems to install them for me in its
own sandbox. Memory of those gems is removed the next time I rebuild
Shoes (git pull; rake) I have to reinstall the gems my app needs
[EMAIL PROTECTED]:~/Projects/shoes$ dist/shoes --help
[EMAIL PROTECTED]:~/Projects/shoes$ dist/shoes --gem install daapclient
ERROR: While executing gem ... (Errno::EACCES)
Permission denied
-
/home/ccoupe/Projects/shoes/dist/ruby/gems/1.8/gems/daapclient-0.2.3/CHANGELOG.txt
in `terminate_interaction': Exiting RubyGems with exit_code 1
I hate sudo for what should be a local install but,
[EMAIL PROTECTED]:~/Projects/shoes$ sudo dist/shoes --gem install daapclient
[sudo] password for ccoupe:
Successfully installed daapclient-0.2.3
1 gem installed
in `gem_original_require': no such file to load -- rdoc/rdoc
That needed sudo suggests there are permission problems between Shoe's
file permissions and and the gem install code but it does work and
doesn't install that gem in the mainstream Ruby places. Those errors
might not get reported if you're doing a gem install from a shoes.setup
block.
I should file a bug report. Oops. I did.
On Sun, 2008-08-24 at 21:14 -0700, Seth Thomas Rasmussen wrote:
> On Fri, Aug 22, 2008 at 2:49 PM, Seth Thomas Rasmussen
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > So, I've been stuck for some weeks now. I had started doing Shoes with
> > an r800something release, and at some point moved to "edge" builds.
> > Things were generally working fine. Then, one day I clobbered my
> > ~/.shoes/ to see the full behavior of my app when first getting setup.
> > I did this because my app depends on a couple gems.
> >
> > One of the gems my app depends on is twitter, which itself depends on
> > hpricot. I initially had no problems with installing twitter via
> > Shoes.setup. Then I started having the setup UI hang like somebody
> > else reported recently.
> > http://article.gmane.org/gmane.comp.lib.shoes/1493. I started hacking
> > around in setup.rb and eventually discovered that part of hpricot's
> > extensions was failing to build when it was trying to install hpricot
> > as a gem. hpricot_scan, I think, but I don't recall for certain.
> >
> > Either way, it seems to me from looking at Shoes::Setup#gem that the
> > idea in Shoes world is that you don't install hpricot as a gem ever.
> > So, I started hacking around in ./req/rubygems on files like
> > installer.rb and dependency_installer.rb to make them aware of Shoes
> > domain logic regarding gems like hpricot and essentially try to ignore
> > them when they come up as dependencies. I've managed to get past
> > problems installing the twitter gem, and though I had to restart the
> > app twice, setup seems to complete now..
> >
> > However my latest issue is that now my app dies because loading of the
> > twitter gem while eval'ing my app 'causes something to throw up when
> > it thinks hpricot doesn't exist.
> >
> > After thinking about this and working on it more, I feel that if Shoes
> > is to support installation of gems for its apps, it would be simplest
> > if hpricot and sqlite3-ruby were installed using gems rather than
> > bunbled as special extra libs of Shoes' Ruby distro. I don't mean to
> > say that they would not be there by default, just that their
> > installation would be a part of any Shoes app's gem awareness.
> >
> > Am I heading in a reasonable direction? Does this smell like something
> > weirdly messed up specific to me? Anyone else having similar problems?
>
> Anyone have any thoughts on this? I don't mind continuing to hack at
> things and figure things out, and I understand if gems support is a
> lower priority for most people or something. Mostly I am curious for
> feedback if I am onto something or if I am missing something entirely.
>
> FWIW, I have tried a bare bones app like
>
> Shoes.setup { gem "twitter" }
> require "twitter"
>
> and have the same issues.
>