Something is wrong in my IOWA

Hello

something is wrong in my isntalation of IOWA.
I have IOWA 0.15 and ruby 1.7.3 (2002-10-29) [i586-linux].
When I create Main.html like this:

<%
class Main < Iowa::Component
attr_reader :loggedTimes
attr_accessor :logItem
def awake
@loggedTimes = []
end
def time
Time.now
end
def log
@loggedTimes << Time.now
end
end
%>

<? logList { list = loggedTimes item = logItem } ?> ... cut some html code Log body
  • @logItem
... cut some html code

running it

$ ruby -riowa -e “Iowa.run(‘tutorial’)”
/home/radek/lib/ruby/site_ruby/iowa/BindingsParser.rb:26: warning: parenthesize argument(s) for future version
listening on /tmp/iowa_tutorial

Wheen looking at http://kvark:8080/iowa/tutorial i get
html which has in place of Log reference:

Log this is obiviusly bad because it doesn't point to iowa but root of apache web.

Can anyone help me? What I made wrong?

···


Radek Hnilica

No matter how far down the wrong road you’ve gone, turn back.
Turkish proverb

I have IOWA 0.15 and ruby 1.7.3 (2002-10-29) [i586-linux].

                        ^^^^^^^^^^

The problem is here

pigeon% cat b.rb
#!./ruby
url = "/iowa/tutorial"
url =~ "(.*?/iowa/[^/]*)(/.*)?"
p $1
url =~ %r{(.*?/iowa/[^/]*)(/.*)?}
p $1
pigeon%

pigeon% ./ruby -v b.rb
ruby 1.7.3 (2002-10-29) [i686-linux]
nil
"/iowa/tutorial"
pigeon%

pigeon% /usr/bin/ruby -v b.rb
ruby 1.6.8 (2002-10-18) [i686-linux]
"/iowa/tutorial"
"/iowa/tutorial"
pigeon%

Change the regexp in Context.rb for the second form

aestivum% less Context.rb

module Iowa

class Context

        attr_accessor :request, :response
        attr_accessor :elementID, :actionID, :requestID, :sessionID
        attr_accessor :session
        
        def initialize(url, params, out)
                url =~ "(.*?/iowa/[^/]*)(/.*)?"
          # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          # modify this line and re-install it
    @urlRoot = $1
[...]
asetivum%

  Verify if it exist other regexp like this

Guy Decoux

I have IOWA 0.15 and ruby 1.7.3 (2002-10-29) [i586-linux].
^^^^^^^^^^
url =~ "(.?/iowa/[^/])(/.)?"
url =~ %r{(.
?/iowa/[^/])(/.)?}

    def initialize(url, params, out)
            url =~ "(.*?/iowa/[^/]*)(/.*)?"
      #  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      #  modify this line and re-install it
  @urlRoot = $1

thanks much, it’s working now

Verify if it exist other regexp like this

I try to look for such things. Hope grep ‘=~’ will be enough.

once again, many thanks for help.

···

On Sat, Nov 02, 2002 at 12:00:46AM +0900, ts wrote:


Radek Hnilica

No matter how far down the wrong road you’ve gone, turn back.
Turkish proverb