[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Instiki problems

Henrik Horneber

11/22/2004 10:06:00 AM

Hi!

I have some problems with instiki, which we use as a internal projekt wiki
here in our company. The problem is the following:

Instiki refuses to render a page with following error message:

Please correct the error that caused this error in rendering:
private method `gsub' called for nil:NilClass

Stack trace is the following:
Rendering: GeneralConsiderations
F:/wiki/instiki-0.9.1/app/models/wiki_words.rb:22:in `separate'
F:/wiki/instiki-0.9.1/app/models/web.rb:45:in `make_link'
F:/wiki/instiki-0.9.1/app/models/page.rb:70:in `link'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:221:in
`template_re
sult'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:221:in
`collect'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:221:in
`template_re
sult'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:162:in
`template_re
sult'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:65:in `render'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:77:in
`render_actio
n'
F:/wiki/instiki-0.9.1/app/controllers/wiki.rb:171:in `show'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:126:in `send'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:126:in
`perform_act
ion'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:32:in `do_GET'
c:/programme/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`__send__'
c:/programme/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`service'
c:/programme/ruby/lib/ruby/1.8/webrick/httpserver.rb:92:in `service'
c:/programme/ruby/lib/ruby/1.8/webrick/httpserver.rb:54:in `run'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:150:in `start_thread'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
F:/wiki/instiki-0.9.1/libraries/web_controller_server.rb:79:in
`start_server'
F:/wiki/instiki-0.9.1/libraries/web_controller_server.rb:22:in `initialize'
F:/wiki/instiki-0.9.1/instiki.rb:58:in `new'
F:/wiki/instiki-0.9.1/instiki.rb:58192.168.100.40 - - [22/Nov/2004:10:54:03
West
europõische Normalzeit] "GET /companywiki/show/GeneralConsiderations
HTTP/1.1" 3
01 220
http://pferd/companywiki/show/conception+of+content ->
/companywiki/show/General
Considerations
[2004-11-22 10:54:04] INFO Performing edit
[2004-11-22 10:54:04] INFO Parameters: {"msg"=>"private method `gsub'
called
for nil:NilClass"}
[2004-11-22 10:54:04] INFO Cookies: author => Henrik
[2004-11-22 10:54:04] INFO Rendering: wiki/edit
192.168.100.40 - - [22/Nov/2004:10:54:04 Westeuropõische Normalzeit] "GET
/compa
nywiki/edit/GeneralConsiderations?msg=private+method+%60gsub%27+called+for+nil%3
ANilClass HTTP/1.1" 200 3549
http://pferd/companywiki/show/conception+of+content ->
/companywiki/edit/General
Considerations?msg=private+method+%60gsub%27+called+for+nil%3ANilClass
[2004-11-22 10:54:04] INFO Performing static_style_sheet
[2004-11-22 10:54:04] INFO Parameters: {}
[2004-11-22 10:54:04] INFO Cookies: author => Henrik
[2004-11-22 10:54:04] INFO Rendering: static_style_sheet
192.168.100.40 - - [22/Nov/2004:10:54:04 Westeuropõische Normalzeit] "GET
/compa
nywiki/static_style_sheet/ HTTP/1.1" 200
2972
http://pferd/companywiki/edit/GeneralConsiderations?msg=private+method+%60gsub%2
7+called+for+nil%3ANilClass -> /companywiki/static_style_sheet/

I _guess_ the root cause is that one of my coworkers tried to insert a page,
which contained some unusual wiki words (actually I would call them wrong...
you'll see what I mean). Something like

[[Lösungen]]
(note the German O 'Umlaut' )

or
[[Installieren der Produkt Umgebung!]]

(note ! after Umgebung, and capital letter words)

In that case it would be related to the problem Roger Sperberg reported on
page ExplainedBugs in the instiki wiki.

Even editing the page so that it contains simple, non-mark up, non-wiki
words text doesn't solve the problem. Shouldn't fixing the offending pages
solve it?

What's the proposed solution? Going back to the latest storage snapshot
where the problem did not occur yet? Somehow I suspect that we'll lose data
in that case, so I am reluctant to try that.

Any clues?

Platform is WinXP, SP2, latest ruby one-click-installer, Instiki 0.9.1


regards,
Henrik

--
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net...
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!


18 Answers

Henrik Horneber

11/22/2004 12:00:00 PM

0

Update:

> I _guess_ the root cause is that one of my coworkers tried to insert a
> page,
> which contained some unusual wiki words (actually I would call them
> wrong...
> you'll see what I mean). Something like
>
> [[Lösungen]]
> (note the German O 'Umlaut' )
>
> or
> [[Installieren der Produkt Umgebung!]]
>
> (note ! after Umgebung, and capital letter words)
>
> In that case it would be related to the problem Roger Sperberg reported on
> page ExplainedBugs in the instiki wiki.
>

Seems like I am wrong. Previous Snapshots that already include the pages
that cause trouble now (they haven't been changed since) work like expected.
Even editing them works. I am absolutely confused. Snapshots from two days
later don't render the pages at all, but directly go to edit mode, because
of the render bug. There have been additions to the wiki and updates to
other pages, so 'diff'ing the storage files does not give any hints, at
least to me...

Help? :-)


regards,
Henrik


--
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/... ++


Henrik Horneber

11/23/2004 10:21:00 AM

0

Hi!

Seems like I am not the only one having problems with Instiki. I got a
message off list, saying they abandon Instiki because of too many bugs to
work around. *Sigh* This is going to be a lot of work.

I am a little bit disappointed that I didn't get any answer from DHH at all
(David, are you reading me?). At least something like 'Sorry, I don't have
the time to support Instiki at the moment because work on Rails takes too
much time' would have been polite.

To quote Daniel Berger from his 'Preparing Ruby Packages for Public
Consumption' page at
http://ruby-miscutils.sourceforge.net/preparing_ruby_pac... :

'Seriously, if you don?t plan on responding to feedback, or don?t like the
notion of answering questions about your code, DO NOT PUBLISH. If you
aren?t willing to maintain your module for at least a year, DO NOT PUBLISH.'

Sorry if this sounds a little harsh, as you might tell, I'm frustrated.
These things always pop up in the worst possible moment.

If I should have sent my problems to a different mailing list, did not
include enough information in my first mail, sounded to rude or whatever
please tell me. :-)

regards,
Henrik

--
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net...
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!


Mauricio Fernández

11/23/2004 10:58:00 AM

0

On Mon, Nov 22, 2004 at 07:06:17PM +0900, Ryco@gmx.net wrote:
> Hi!
>
> I have some problems with instiki, which we use as a internal projekt wiki
> here in our company. The problem is the following:
>
> Instiki refuses to render a page with following error message:
>
> Please correct the error that caused this error in rendering:
> private method `gsub' called for nil:NilClass
>
> Stack trace is the following:
> Rendering: GeneralConsiderations
> F:/wiki/instiki-0.9.1/app/models/wiki_words.rb:22:in `separate'
> F:/wiki/instiki-0.9.1/app/models/web.rb:45:in `make_link'
> F:/wiki/instiki-0.9.1/app/models/page.rb:70:in `link'

You could try to find the source of this with something like


--- wiki_words.rb.orig 2004-11-23 11:51:08.000000000 +0100
+++ wiki_words.rb 2004-11-23 11:54:36.000000000 +0100
@@ -16,10 +16,11 @@
WIKI_WORD_PATTERN = '[A-Z' + I18N_HIGHER_CASE_LETTERS + '][a-z' + I18N_LOWER_CASE_LETTERS + ']+[A-Z' + I18N_HIGHER_CASE_LETTERS + ']\w+'

def self.separate(wiki_word, ignore_separation = false)
+ return "BOGUSMARKER" if wiki_word.nil?
if ignore_separation
wiki_word
else
wiki_word.gsub(/([a-z#{I18N_LOWER_CASE_LETTERS}])([A-Z#{I18N_HIGHER_CASE_LETTERS}])/u, '\1 \2')
end
end
-end
\ No newline at end of file
+end



Then grep for BOGUSMARKER.
--
Hassle-free packages for Ruby?
RPA is available from http://www.rubyar...


Dick Davies

11/23/2004 12:02:00 PM

0

* Ryco@gmx.net <Ryco@gmx.net> [1121 10:21]:
> Hi!
>
> Seems like I am not the only one having problems with Instiki. I got a
> message off list, saying they abandon Instiki because of too many bugs to
> work around. *Sigh* This is going to be a lot of work.

Have you had a look on the home wiki? There are several patches that should
help.

--
common sense is what tells you that the world is flat. - Principia Discordia
Rasputin :: Jack of All Trades - Master of Nuns


Henrik Horneber

11/23/2004 12:30:00 PM

0



> You could try to find the source of this with something like
>
[...]
> Then grep for BOGUSMARKER.

Thanks a lot for your reply, Mauricio!

I had tried something similar already yesterday evening, without success. I
did it again right now with your approach, and I'm only getting more
confused :).

First of all, it doesn't solve the problem, just moves it to a higher level,
even though BOGUSMARKER shows up.
log:

[2004-11-23 13:03:41] INFO WEBrick 1.3.1
[2004-11-23 13:03:41] INFO ruby 1.8.2 (2004-07-29) [i386-mswin32]
[2004-11-23 13:03:41] INFO Your WEBrick server is now running on
http://localho
st:80
[2004-11-23 13:03:41] INFO WEBrick::HTTPServer#start: pid=2028 port=80
[2004-11-23 13:03:52] INFO Performing show
[2004-11-23 13:03:52] INFO Parameters: {}
[2004-11-23 13:03:52] INFO Cookies: author => Henrik
[2004-11-23 13:03:52] INFO Rendering: wiki/page
Rendering: GeneralConsiderations
text is Give imposing insights in Product features !. Is it nil? false
text is Delete dispensable information!. Is it nil? false
text is Update antiquated information !. Is it nil? false
text is Add missing information!. Is it nil? false
text is Reconsider the composition of the pages at all!. Is it nil? false
text is En Force_the_company_profile. Is it nil? false
Rendering: GeneralConsiderations
text is Give imposing insights in Product features !. Is it nil? false
text is Delete dispensable information!. Is it nil? false
text is Update antiquated information !. Is it nil? false
text is Add missing information!. Is it nil? false
text is Reconsider the composition of the pages at all!. Is it nil? false
text is En Force_the_company_profile. Is it nil? false
text is Henrik. Is it nil? false
text is conception of content. Is it nil? false
text is BOGUSMARKER. Is it nil? false
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ what the???
c:/programme/ruby/lib/ruby/1.8/cgi.rb:342:in `escape'
F:/wiki/instiki-0.9.1/app/models/web.rb:47:in `make_link'
F:/wiki/instiki-0.9.1/app/models/page.rb:70:in `link'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:221:in
`template_re
sult'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:221:in
`collect'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:221:in
`template_re
sult'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:162:in
`template_re
sult'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:65:in `render'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:77:in
`render_actio
n'
F:/wiki/instiki-0.9.1/app/controllers/wiki.rb:171:in `show'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:126:in `send'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:126:in
`perform_act
ion'
F:/wiki/instiki-0.9.1/libraries/action_controller_servlet.rb:32:in `do_GET'
c:/programme/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`__send__'
c:/programme/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`service'
c:/programme/ruby/lib/ruby/1.8/webrick/httpserver.rb:92:in `service'
c:/programme/ruby/lib/ruby/1.8/webrick/httpserver.rb:54:in `run'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:150:in `start_thread'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
c:/programme/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
F:/wiki/instiki-0.9.1/libraries/web_controller_server.rb:79:in
`start_server'
F:/wiki/instiki-0.9.1/libraries/web_controller_server.rb:22:in `initialize'
F:/wiki/instiki-0.9.1/instiki.rb:58:in `new'
F:/wiki/instiki-0.9.1/instiki.rb:58192.168.100.120 - - [23/Nov/2004:13:03:52
Wes
teuropõische Normalzeit] "GET /companywiki/show/GeneralConsiderations
HTTP/1.1"
301 220
- -> /companywiki/show/GeneralConsiderations
[2004-11-23 13:03:52] INFO Performing edit
[2004-11-23 13:03:52] INFO Parameters: {"msg"=>"private method `gsub'
called
for nil:NilClass"}
[2004-11-23 13:03:52] INFO Cookies: author => Henrik
[2004-11-23 13:03:52] INFO Rendering: wiki/edit
192.168.100.120 - - [23/Nov/2004:13:03:52 Westeuropõische Normalzeit] "GET
/comp
anywiki/edit/GeneralConsiderations?msg=private+method+%60gsub%27+called+for+nil%
3ANilClass HTTP/1.1" 200 3872
- ->
/companywiki/edit/GeneralConsiderations?msg=private+method+%60gsub%27+calle
d+for+nil%3ANilClass
[2004-11-23 13:03:53] INFO Performing static_style_sheet
[2004-11-23 13:03:53] INFO Parameters: {}
[2004-11-23 13:03:53] INFO Cookies: author => Henrik
[2004-11-23 13:03:53] INFO Rendering: static_style_sheet
192.168.100.120 - - [23/Nov/2004:13:03:53 Westeuropõische Normalzeit] "GET
/comp
anywiki/static_style_sheet/ HTTP/1.1" 200
2972
http://pferd/companywiki/edit/GeneralConsiderations?msg=private+method+%60gsub%2
7+called+for+nil%3ANilClass -> /companywiki/static_style_sheet/
[2004-11-23 13:04:24] INFO going to shutdown ...
[2004-11-23 13:04:24] INFO WEBrick::HTTPServer#start done.


The lines 'text is...' come from a puts statement I inserted into web.rb
between the call wiki_words and CGI#escape.

Second, and even more confusing, is the fact that one of the offending pages
seems to get rendered without being requested.

log2:
F:\wiki\instiki-0.9.1>instiki.rb
[2004-11-23 12:57:51] INFO WEBrick 1.3.1
[2004-11-23 12:57:51] INFO ruby 1.8.2 (2004-07-29) [i386-mswin32]
[2004-11-23 12:57:51] INFO Your WEBrick server is now running on
http://localhost:80
[2004-11-23 12:57:51] INFO WEBrick::HTTPServer#start: pid=1824 port=80
[2004-11-23 12:57:55] INFO Performing index
[2004-11-23 12:57:55] INFO Parameters: {}
[2004-11-23 12:57:55] INFO Cookies: author => Henrik
192.168.100.120 - - [23/Nov/2004:12:57:55 Westeuropõische Normalzeit] "GET
/comp
anywiki HTTP/1.1" 301 82
- -> /companywiki
[2004-11-23 12:57:55] INFO Performing show
[2004-11-23 12:57:55] INFO Parameters: {}
[2004-11-23 12:57:55] INFO Cookies: author => Henrik
[2004-11-23 12:57:55] INFO Rendering: wiki/page
text is Henrik. Is it nil? false
Rendering: GeneralConsiderations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ there was no request for this page.
text is Frequently Asked Questions. Is it nil? false
192.168.100.120 - - [23/Nov/2004:12:57:55 Westeuropõische Normalzeit] "GET
/comp
anywiki/show/HomePage HTTP/1.1" 200 5100
- -> /companywiki/show/HomePage
[2004-11-23 12:57:55] INFO Performing static_style_sheet
[2004-11-23 12:57:55] INFO Parameters: {}
[2004-11-23 12:57:55] INFO Cookies: author => Henrik
[2004-11-23 12:57:55] INFO Rendering: static_style_sheet
192.168.100.120 - - [23/Nov/2004:12:57:55 Westeuropõische Normalzeit] "GET
/comp
anywiki/static_style_sheet/ HTTP/1.1" 200 2972
http://pferd/companywiki/show/HomePage -> /companywiki/static_style_sheet/
[2004-11-23 12:58:07] INFO Performing show
[2004-11-23 12:58:07] INFO Parameters: {}
[2004-11-23 12:58:07] INFO Cookies: author => Henrik
[2004-11-23 12:58:07] INFO Rendering: wiki/page
text is Peter. Is it nil? false
text is Home Page. Is it nil? false
192.168.100.120 - - [23/Nov/2004:12:58:07 Westeuropõische Normalzeit] "GET
/comp
anywiki/show/businessbitsDecision HTTP/1.1" 200 3874
http://pferd/companywiki/show/HomePage ->
/companywiki/show/businessbitsDecision

[2004-11-23 12:58:08] INFO Performing static_style_sheet
[2004-11-23 12:58:08] INFO Parameters: {}
[2004-11-23 12:58:08] INFO Cookies: author => Henrik
[2004-11-23 12:58:08] INFO Rendering: static_style_sheet
192.168.100.120 - - [23/Nov/2004:12:58:08 Westeuropõische Normalzeit] "GET
/comp
anywiki/static_style_sheet/ HTTP/1.1" 200 2972
http://pferd/companywiki/show/businessbitsDecision ->
/companywiki/static_style_
sheet/
[2004-11-23 12:59:01] INFO going to shutdown ...
[2004-11-23 12:59:01] INFO WEBrick::HTTPServer#start done.


Clearly, there was no request to GeneralConsiderations during the whole life
of the server.


Third, when I change the page GeneralConsiderations, I get a message that I
should correct spurious Nilclass error first. But when I shut down instiki,
and start it up again, the changed content, together with the oh so beloved
error msg appears. It seems to get stored despite of the error and contrary
to what the page tells me.

Since neither I nor anybody else here at work has any more time to dig into
this mysterium, we'll just bite the bullet and move away from Instiki to
something more stable. It's a shame though, I really enjoyed to work with
it. RedCloth/BlueCloth and Madeleine make it really easy to use and setup.

Anyway, thanks for the suggestion.

Henrik


--
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/... ++


Henrik Horneber

11/23/2004 12:34:00 PM

0


> Have you had a look on the home wiki? There are several patches that
> should
> help.

Check my first mail in this thread. I looked at the home wiki, but could not
find a patch that seemed related to my problem. Maybe I'm blind. I'll have
another look now, and then stop bitchin' around. ;)

Thanks for your reply!

--
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/... ++


gabriele renzi

11/23/2004 12:35:00 PM

0

Dick Davies ha scritto:

> Have you had a look on the home wiki? There are several patches that should
> help.
>

Maybe someone could provide an up to date patched package and put a link
on the wiki, just for the time DHH remains prisoner of the Rails Army :)

David Heinemeier Hansson

11/23/2004 2:13:00 PM

0

> I am a little bit disappointed that I didn't get any answer from DHH
> at all
> (David, are you reading me?). At least something like 'Sorry, I don't
> have
> the time to support Instiki at the moment because work on Rails takes
> too
> much time' would have been polite.

I'm sorry for your troubles, Ryco. Instiki is indeed not being actively
maintained right now. I have other obligations that have taken
precedence.

Such is the life of open source software.
--
David Heinemeier Hansson,
http://www.basec... -- Web-based Project Management
http://www.rubyon... -- Web-application framework for Ruby
http://macro... -- TextMate: Code and markup editor (OS X)
http://www.loudthi... -- Broadcasting Brain



Mauricio Fernández

11/23/2004 2:27:00 PM

0

On Tue, Nov 23, 2004 at 11:12:35PM +0900, David Heinemeier Hansson wrote:
> >I am a little bit disappointed that I didn't get any answer from DHH
> >at all
> >(David, are you reading me?). At least something like 'Sorry, I don't
> >have
> >the time to support Instiki at the moment because work on Rails takes
> >too
> >much time' would have been polite.
>
> I'm sorry for your troubles, Ryco. Instiki is indeed not being actively
> maintained right now. I have other obligations that have taken
> precedence.
>
> Such is the life of open source software.

Time to pass the patch pumpkin?

--
Hassle-free packages for Ruby?
RPA is available from http://www.rubyar...


Henrik Horneber

11/23/2004 2:28:00 PM

0


>
> I'm sorry for your troubles, Ryco. Instiki is indeed not being actively
> maintained right now. I have other obligations that have taken
> precedence.

Then why does the home wiki say

"Instiki was written and _is_maintained_ by David Heinemeier Hansson."
(emphasis mine)? You can't have it both way, not even in magical open source
land.

Henrik

--
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/... ++