Note that there are some explanatory texts on larger screens.

plurals
  1. PORails Lib files loading error
    primarykey
    data
    text
    <p>In my project I'm using some custom liquid tags and I have created a folder called 'Liquid' inside my 'lib' directory and there I have a liquid module called helpers, </p> <pre><code>module Liquid::Helpers end </code></pre> <p>So the project tree is as follows</p> <p>Root</p> <pre><code>--&gt; lib --&gt; Liquid </code></pre> <p>And I'm trying to register my tags in my environment.rb file </p> <pre><code>Liquid::Template.register_filter(Liquid::Helpers) </code></pre> <p>To load my lib files when the server starts, I'm trying this in application.rb</p> <pre><code>config.autoload_paths &lt;&lt; File.join(Rails.root.to_s, "lib") </code></pre> <p>But I'm getting the following error</p> <p>': uninitialized constant Liquid::Helpers (NameError)</p> <p>What am i missing here, can someone help me, thanks in advance</p> <p>cheers</p> <p>sameera</p> <p>Update - </p> <p>I'm on Rails3 with Ubuntu. Following is my full error code</p> <pre><code>`&lt;top (required)&gt;': uninitialized constant Liquid::Helpers (NameError) from &lt;project path&gt;/config.ru:3:in `require' from &lt;project path&gt;/config.ru:3:in `block in &lt;main&gt;' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize' from &lt;project path&gt;/config.ru:1:in `new' from &lt;project path&gt;/config.ru:1:in `&lt;main&gt;' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:35:in `eval' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:35:in `parse_file' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:162:in `app' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:248:in `wrapped_app' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:213:in `start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands/server.rb:65:in `start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:30:in `block in &lt;top (required)&gt;' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `tap' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `&lt;top (required)&gt;' from script/rails:6:in `require' from script/rails:6:in `&lt;main&gt;' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload