I need to set up a Wiki for a project that I''m working on, and HIeraki
seems to be the best rails-based option for my needs. I''ve got it
installed & with the help of some notes on the net, it''s mostly
working. Unfortunately there are a few big bugs still, including one
when I try to create a new page. I''m new enough at Rails that my
debugging skills are seriously lacking. Can anyone offer any
suggestions? The relevant code is below the error message.
Any help is appreciated!
Thanks,
Mike
~~~~~~~
NoMethodError in Wiki/documentController#new
undefined method `new'' for Wiki::Document:Module
RAILS_ROOT: ../config/..
Application Trace | Framework Trace | Full Trace
#{RAILS_ROOT}/app/controllers/wiki/processor/instruction_set.rb:47:in
`create_new_page''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:399:in `call_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:394:in `call_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:383:in `before_action''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:365:in `perform_action_without_benchmark''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
benchmarking.rb:69:in `perform_action_without_rescue''
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
benchmarking.rb:69:in `perform_action_without_rescue''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
rescue.rb:82:in `perform_action''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
base.rb:408:in `process_without_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:377:in `process_without_session_management_support''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
session_management.rb:117:in `process''
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
`dispatch''
dispatch.cgi:10
#{RAILS_ROOT}/app/controllers/wiki/processor/instruction_set.rb:47:in
`create_new_page''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:399:in `call_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:394:in `call_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:383:in `before_action''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:365:in `perform_action_without_benchmark''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
benchmarking.rb:69:in `perform_action_without_rescue''
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
benchmarking.rb:69:in `perform_action_without_rescue''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
rescue.rb:82:in `perform_action''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
base.rb:408:in `process_without_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
filters.rb:377:in `process_without_session_management_support''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/
session_management.rb:117:in `process''
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
`dispatch''
dispatch.cgi:10
Request Parameters: None
Show session dump
---
clipboard: !ruby/object:Clipboard
stack: []
user: !ruby/object:User
attributes:
name: MikeP
id: "1"
password:
login: mikep
created_at: 2007-05-11 00:23:26
email: mike-yyoAE1XQ3qYvU088eW+fZEEOCMrvLtNR@public.gmane.org
read_history: !ruby/object:ReadHistory
stack:
- !ruby/object:Node
__parent:
attributes:
name: ROOT
lft: "1"
page_id: "1"
parent_name: "0"
rgt: "4"
position: "1"
page: !ruby/object:Folder
attributes:
updated_at: 2007-05-11 00:20:09
type: Folder
id: "1"
version: "1"
keywords: ""
revisions:
- !ruby/object:FolderRevision
attributes:
title: ROOT
published: "1"
meta_id: "1"
type: FolderRevision
page_id: "1"
id: "1"
ip: ""
user_id: "1"
comment: ""
created_at: 2007-05-11 00:20:09
meta: !ruby/object:FolderRevisionMeta
attributes:
id: "1"
description: ""
settings: !ruby/object:Settings
configuration:
:tree: {}
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers: {"cookie"=>[],
"Cache-Control"=>"no-cache"}
~~~~~~~~~~
app/controllers/wiki/document_controller.rb
~~~~~~~~~~
class Wiki::DocumentController < Wiki::PageController
include Wiki::WikiActions
end
~~~~~~~~~~
app/controllers/wiki/wiki_actions.rb
~~~~~~~~~~
module Wiki::WikiActions
def new
super
end
[lots more similar methods deleted]
end
~~~~~~~~~~~
app/controllers/wiki/document_controller.rb
~~~~~~~~~~~
class Wiki::PageController < ApplicationController
[deleted]
def new
@node.page = @page
if update_context
flash[''notice''] = "#{@page.type} was successfully
created."
redirect_to(wiki_url)
end
end
[deleted]
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---