2
votes

I'm getting the following error in my Liquid view:

Liquid error: No such template 'sliders/slider' #<Liquid::LocalFileSystem:0x99319b8>

The file structure in my liquid code (which saves in the database) has the following code:

{% include 'sliders/slider' %} 

and in my view where I render the Liquid content is as follows

<%
Liquid::Template.file_system = Liquid::LocalFileSystem.new("sliders/slider")
@template = Liquid::Template.parse(<page code>) %>
<%= raw @template.render(<variables>)  %>

<%= Liquid::LocalFileSystem.new("sliders/slider") %>

And in app/views/sliders/ I have a file called '_slider.erb'.

But if I do a <%= render :partial => "sliders/slider" %> it shows the file

Am I missing something here? I'm using Rails 3 with Liquid 2.2.2 and on Linux.

1

1 Answers

2
votes

I think your partial filename should be: _slider.liquid for it to work properly.