When dealing with Shoes one needs to remember it's a self contained Ruby
runtime, completely unrelated to whatever version of Ruby you have on
your box or which gems you have installed.

Shoes is it own environment. It's not full Ruby, it's only partial Ruby.
It evals your script within the selection of Ruby Libraries/Gems it
cares to distribute. CGI might not be one of them. How to get your
favorite gem or shared library included (as best I know) in your app is
undocumented.

It has it's own gem library. 

Pure Ruby gems/modules should be pretty easy if you poke around and
understand the Shoes execution environment and where the files go. I've
only looked enough to know where to look first. Native libraries (I
don't know that CGI is one but I kind of remember some WTF? last I
looked). Native libs you can probably tweak the environment variables
for you, but that doesn't "Make it so" on the other platforms unless you
can compile on them all.

Did I forget to say Welcome Christoph? I did forget. Sorry. 
--Cecil

On Mon, 2008-07-07 at 08:25 +0200, Christoph Budzinski wrote:
> (oh god, first time on a mailing list, *everything* could go wrong!)
> 
> Hi,
> 
> I need to url encode and html escape Strings for two apps that I am  
> working on, an aMSN/Mercury Chatlog viewer and chatlog2html converter  
> (I have to send my chatlogs to a friend every month or she kills me by  
> pouting intensivly) and a Twitter search app, so I wrote: require 'cgi'
> 
> The trouble is, Shoes tells me: no such file to load -- cgi
> 
> It doesn't matter if I put the require statement inside or outside the  
> Shoes.app block, it doesn't work anywhere. I tried that because  
> functions seem to work only when they are inside the Shoes.app block.  
> I'm sure there's an obvious reason for why that is, but I have a  
> talent for not seeing the obvious.
> 
> I'm using Shoes r751 on Mac OS X 10.5.4 Leopard on an Intel Mac by the  
> way. I can try it on a PPC Mac too if this error is not known and more  
> info is needed.
> 
> I searched the mailing list archives for "require cgi" and found  
> someone else who had this problem in May 2008,  he said it was fixed  
> in the repository for him, but I believe r751 which I use should  
> already have the fix in it if it was fixed that long ago, so it  
> doesn't seem to be fixed. I tried to build Shoes then from the git  
> repository to see if it is fixed now. Didn't work though, like the  
> warning on the Shoes website about building Shoes yourself already  
> fortold.
> 
> I tried to build Shoes with the pre-built dependencies package, but it  
> is missing the Pixman library as far as I could tell (the compiler log  
> told me so and I couldn't find the library in the deps package when I  
> looked for it), so the build stopped there. I then tried to do it  
> without the deps by installing some things with MacPorts on my own,  
> but that didn't work either, I'm sure I missed some dependencies or  
> something, or I have to tell the compiler where I installed the stuff  
> (and I don't know anything about compiling, I'm used to IDEs doing  
> that kind of stuff for me automagically).
> 
> So, my question is, is this a known bug - and is there a way around  
> this? Some evil trick I am not aware of that I could use for the time  
> being to get access to the methods in cgi? For the Twitter search app  
> I just used gsub to replace some stuff myself, but the Chatlog viewer/ 
> converter needs to convert a lot of special characters to html, so  
> doing that manually would mean writing a fairly large chunk of code (I  
> think).
> 
> --
> Chris

Reply via email to