I’m running Hieraki with frozen rails 1.0 (vendor/rails)
Here are three of the files I changed to get Hieraki working:
I patched the search so it would work. Using Typo search as a guide:
=======================================
models/wiki/page.rb lines ~65-86
def self.search(query, options = {})
configuration = { :only_published => false }
configuration.update(options) if options.is_a?(Hash)
if !query.to_s.strip.empty?
published = ‘AND published != 0’ if configuration[:only_published]
tokens = query.split
if configuration[:only_published]
else
# Using SQLite3, now - Ed Gard
#find_by_sql(["SELECT *
# FROM pages
# WHERE MATCH (keywords) AGAINST (?)",
tokens.join(’ ')])
end
# New - Ed Gard
find(:all,
:conditions => [(["(LOWER(keywords) LIKE ?)"] *
tokens.size).join(" AND "), *tokens.collect { |token| [token] * 1
}.flatten],
:order => ‘updated_at DESC’)
else
[]
end
end
=============================================
Another changed file:
views/wiki/actions/_edit_acl.rhtml
<%= heading_for(@page, ‘Permission Settings’)%>
<%= start_form_tag wiki_url(@page, :action => ‘edit_acl’) %>
User:
<%= render_spinner('user') %>
|
|
<%= end_form_tag %>
<%= render :partial => ‘shared/control_buttons’ %>
<%= observe_field “login”,
{ :frequency => 0.5,
:url => wiki_url(@page, :controller =>
‘wiki/acl’, :action => ‘show’),
:with => “‘login=’+ escape($(‘login’).value)”,
:update => ‘user_result’
}.merge(remote_spinner(‘user’, ‘user_result’)) %>
============
Added a migration:
db/migrate/001_initial_schema.rb
class InitialSchema < ActiveRecord::Migration
def self.up
create_table “acl”, :force => true do |t|
t.column “user_id”, :integer, :default => 0, :null => false
t.column “page_id”, :integer, :default => 0, :null => false
t.column “control_bit”, :integer, :limit => 1, :default => 0
t.column “modify_bit”, :integer, :limit => 1, :default => 0
t.column “delete_bit”, :integer, :limit => 1, :default => 0
t.column “create_bit”, :integer, :limit => 1, :default => 0
end
create_table "document_revision_meta", :force => true do |t|
t.column "body", :text, :default => "", :null => false
end
create_table "external_link_revision_meta", :force => true do |t|
t.column "url", :string, :default => "", :null => false
t.column "description", :text, :default => "", :null => false
end
create_table "folder_revision_meta", :force => true do |t|
t.column "description", :text, :default => "", :null => false
end
create_table "internal_link_revision_meta", :force => true do |t|
t.column "link_to_name", :string, :default => "", :null => false
end
create_table "mimes", :id => false, :force => true do |t|
t.column "filetype", :string, :limit => 10, :default => "", :null
=> false
t.column “mimetype”, :string, :limit => 50, :default => “”, :null
=> false
end
create_table "nodes", :id => false, :force => true do |t|
t.column "name", :string, :default => "", :null => false
t.column "parent_name", :string, :default => "", :null => false
t.column "page_id", :integer, :default => 0, :null => false
t.column "position", :integer, :default => 0, :null => false
t.column "lft", :integer, :default => 0, :null => false
t.column "rgt", :integer, :default => 0, :null => false
end
add_index "nodes", ["parent_name"], :name => "parent_name"
create_table "page_revisions", :force => true do |t|
t.column "page_id", :integer, :default => 0, :null => false
t.column "meta_id", :integer, :default => 0, :null => false
t.column "user_id", :integer, :default => 0, :null => false
t.column "type", :string, :default => "", :null => false
t.column "title", :string, :default => "", :null => false
t.column "comment", :string, :default => ""
t.column "published", :integer, :limit => 1, :default => 0
t.column "created_at", :datetime
t.column "ip", :string, :limit => 15
end
create_table "pages", :force => true do |t|
t.column "version", :integer, :default => 0, :null => false
t.column "keywords", :text, :default => "", :null => false
t.column "type", :string, :default => "", :null => false
t.column "updated_at", :datetime
end
add_index "pages", ["type"], :name => "type"
add_index "pages", ["keywords"], :name => "keywords"
create_table "users", :force => true do |t|
t.column "name", :string, :limit => 80, :default => "", :null =>
false
t.column “login”, :string, :limit => 80, :default => “”, :null =>
false
t.column “email”, :string, :default => “”, :null => false
t.column “password”, :string, :limit => 40
t.column “created_at”, :datetime
end
end
def self.down
end
end
====================================
Ed
Will Jessup wrote:
Ahoy,
I tried to install hieraki and it was a big mess.
- upload_progress module needed to be installed
- no test/development server configured in the config file so i had to
add those
- no log directory, had to add that
- had to install 2 gems (ok fine)
- once the server started, go to homepage and
" NameError in Wiki/pageController#index
uninitialized constant Node
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
This error occured while loading the following files:
wiki/processor/instruction_set/node.rb"
I didn’t find any documentation , help or otherwise anywhere.