[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

wee 0.7 questions

Its Me

2/9/2005 4:36:00 AM

I'm having trouble with many of the 'requires' or '/app/' not found, or some
'favicon.ico' in wee 0.7 examples. I'm running with gems 0.84.

I've tried various combinations of
require 'rubygems' and
require 'wee/continuation'
to no avail.

Am I doing something wrong? If not, any idea when a revised version might be
out?

Thanks!


[C:\ruby\lib\ruby\gems\1.8\gems\wee-0.7.0\examples]ruby calculator.rb
calculator.rb:1:in `require': No such file to load -- wee (LoadError)
from calculator.rb:1

[C:\ruby\lib\ruby\gems\1.8\gems\wee-0.7.0\examples]ruby -rubygems
calculator.rb
[2005-02-08 22:28:50] INFO WEBrick 1.3.1
[2005-02-08 22:28:50] INFO ruby 1.8.2 (2004-11-06) [i386-mswin32]
[2005-02-08 22:28:50] INFO WEBrick::HTTPServer#start: pid=2304 port=2000
[2005-02-08 22:29:21] ERROR `/app/' not found.
127.0.0.1 - - [08/Feb/2005:22:29:21 Central Standard Time] "GET /app/
HTTP/1.1" 404 2
74
- -> /app/
[2005-02-08 22:29:21] ERROR `/favicon.ico' not found.
127.0.0.1 - - [08/Feb/2005:22:29:21 Central Standard Time] "GET /favicon.ico
HTTP/1.1
" 404 281
- -> /favicon.ico



8 Answers

Michael Neumann

2/13/2005 11:04:00 PM

0

itsme213 wrote:
> I'm having trouble with many of the 'requires' or '/app/' not found, or some
> 'favicon.ico' in wee 0.7 examples. I'm running with gems 0.84.
>
> I've tried various combinations of
> require 'rubygems' and
> require 'wee/continuation'
> to no avail.
>
> Am I doing something wrong? If not, any idea when a revised version might be
> out?

You always need:

require 'wee'

Optionally:

require 'wee/contination'

Wee+continatuions+rubygems:

require 'rubygems'
require 'wee'
require 'wee/continuations'

Well, the favicons ERROR is just because your browser automatically
tries to fetch /favicon.ico for each domain to display as icon in the
address bar. If you want this to go away, simply add a WEBrick file handler.

Regards,

Michael


Joao Pedrosa

2/13/2005 11:22:00 PM

0

Hi,

This topic is useful. :-)

Michael, I have taken a shallow look at Wee and I plan to study it
further. But maybe your experience may have an answer to this
question:

One of the good things of the Rails approach is that the creation,
edition and testing cycle of new pages is straightforward -- just
create a new page, test it, edit it, test it again, and so on, until
it's good enough to go into production. I wonder if Wee supports this
fast development cycle by default? And do you know of any other stable
Ruby web-framework that supports it as well?

Thanks a bunch.

Cheers,
Joao


Michael Neumann

2/13/2005 11:36:00 PM

0

Joao Pedrosa wrote:
> Hi,
>
> This topic is useful. :-)
>
> Michael, I have taken a shallow look at Wee and I plan to study it
> further. But maybe your experience may have an answer to this
> question:
>
> One of the good things of the Rails approach is that the creation,
> edition and testing cycle of new pages is straightforward -- just
> create a new page, test it, edit it, test it again, and so on, until
> it's good enough to go into production. I wonder if Wee supports this
> fast development cycle by default? And do you know of any other stable
> Ruby web-framework that supports it as well?

Well, you can create a new component in Wee, render it (in a www
browser), then modify it, render it again and so on. The source file is
reloaded whenever you change the file where the component is defined
(using Wee's autoreload, which you can turn off for production use).

Is it that what you mean?

Regards,

Michael


Joao Pedrosa

2/13/2005 11:45:00 PM

0

Hi,

> Well, you can create a new component in Wee, render it (in a www
> browser), then modify it, render it again and so on. The source file is
> reloaded whenever you change the file where the component is defined
> (using Wee's autoreload, which you can turn off for production use).
>
> Is it that what you mean?

Yes, at least partly. I still wonder if I can keep creating new
components while Wee is running, or do I need to restart it whenever I
create a new component?

It's great to know that it supports the autoreloading of modified
components already.

It's good enough to me. :-)

Thanks,
Joao


Michael Neumann

2/14/2005 12:16:00 AM

0

Joao Pedrosa wrote:
> Hi,
>
>
>>Well, you can create a new component in Wee, render it (in a www
>>browser), then modify it, render it again and so on. The source file is
>>reloaded whenever you change the file where the component is defined
>>(using Wee's autoreload, which you can turn off for production use).
>>
>>Is it that what you mean?
>
>
> Yes, at least partly. I still wonder if I can keep creating new
> components while Wee is running, or do I need to restart it whenever I
> create a new component?

You can modify the source code of a component and reload that, but the
component in memory will not change. So whenever you modify the state
(not the code) of the component, you should create a new session (which
creates a "fresh" components tree).

> It's great to know that it supports the autoreloading of modified
> components already.
>
> It's good enough to me. :-)

Just try it out, and if you encounter problems, ask ;-)

Regards,

Michael



Joao Pedrosa

2/14/2005 1:02:00 AM

0

Hi,

> Just try it out, and if you encounter problems, ask ;-)

Ok, I'm adding it to my subversion repository. :-)

Cheers,
Joao


Its Me

2/16/2005 4:13:00 AM

0


"Michael Neumann" <mneumann@ntecs.de> wrote in message
news:420FDCD1.7020103@ntecs.de...

Still having some const problems (module not yet defined, I think) with
getting several examples to run:
- cc.rb
- draw.rb
- ObjectSpaceBrowser.rb
- test.rb

../lib/wee/utils/cache.rb:3: uninitialized constant Wee::Utils (NameError)



Michael Neumann

2/16/2005 10:26:00 AM

0

itsme213 wrote:
> "Michael Neumann" <mneumann@ntecs.de> wrote in message
> news:420FDCD1.7020103@ntecs.de...
>
> Still having some const problems (module not yet defined, I think) with
> getting several examples to run:
> - cc.rb
> - draw.rb
> - ObjectSpaceBrowser.rb
> - test.rb

Those are "old" examples which I have not updated while changing Wee. I
fixed most of them now in svn. Please download them from:
http://www.ntecs.de/viewcvs/viewcvs/Wee/trunk...

ObjectSpaceBrowser.rb: works now. point your browser to
http://localhost:2000/ob

cc.rb: works now.

test.rb: works now. shows use of expire_after and limiting the session
cache.

draw.rb: Still broken. This was a little example demonstrating how to
display dynamic graphics with Wee and how to use image-maps. I have to
introduce ResourceHandlers again before this example will work.

Regards,

Michael