Forum: Ruby on Rails installing hieraki help

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Will J. (Guest)
on 2006-04-21 09:44
Ahoy,

I tried to install hieraki and it was a big mess.

1) upload_progress module needed to be installed
2) no test/development server configured in the config file so i had to
add those
3) no log directory, had to add that
4) had to install 2 gems (ok fine)
5) 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.
agilesoftware (Guest)
on 2006-04-24 10:05
Will Jessup wrote:
> Ahoy,
> 5) 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.
I have this problem too
agilesoftware (Guest)
on 2006-04-24 10:13
This only happen with development environment, production is ok, I don't
know why?
Enrique Meza C (Guest)
on 2006-04-26 08:01
(Received via mailing list)
El lun, 24-04-2006 a las 08:13 +0200, agilesoftware escribió:
> This only happen with development environment, production is ok, I don't
> know why?
>

No is exactly the same.

uninitialized constant Node

RAILS_ROOT: script/../config/..



/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing'
#{RAILS_ROOT}/app/controllers/wiki/processor/instruction_set.rb:8:in
`lookup_root'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:399:in
`call_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:394:in
`call_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:383:in
`before_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:365:in
`perform_action_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/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.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
`perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in
`process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
`process'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in
`handle_dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
script/server:3
This error occured while loading the following files:
   wiki/processor/instruction_set/node.rb
Peter M. (Guest)
on 2006-04-26 08:04
(Received via mailing list)
does the hieraki mailing list work? is the website ok? seems like
something has gone wrong with the project.

Peter
Ed G. (Guest)
on 2006-04-26 17:30
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') %>


<table>
  <tr>
    <td>
      <label for="user">User:</label>
      <input type="text" id="login" name="login" value="" size="30"
class="short" />
      <%= render_spinner('user') %>
    </td>
  </tr>
  <tr>
    <td id="user_result">
    </td>
  </tr>
</table>

<%= 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.
>
> 1) upload_progress module needed to be installed
> 2) no test/development server configured in the config file so i had to
> add those
> 3) no log directory, had to add that
> 4) had to install 2 gems (ok fine)
> 5) 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.
This topic is locked and can not be replied to.