Note that there are some explanatory texts on larger screens.

plurals
  1. POMiddleman Dynamic Pages Issue
    primarykey
    data
    text
    <p>So I have a database called development.sqlite3 and it is in the same directory as my config.rb.</p> <p>When I go into IRB and type in the following:</p> <pre><code>require 'data_mapper' DataMapper.setup :default, "sqlite://#{Dir.pwd}/development.sqlite3" class Post include DataMapper::Resource property :title, String property :slug_url, String, :key =&gt; true property :desc, String property :content, Text property :project, String property :target_url, Text property :trackback, Integer property :updated_at, String property :created_at, DateTime # A DateTime, for any date you might like. end DataMapper.finalize DataMapper.auto_upgrade! posts = Post.all puts post.slug_url </code></pre> <p>And this kicks out all the slug_urls like I would expect. Here is what I have at the beginning of of config.rb file. </p> <pre><code>require 'data_mapper' require 'builder' require 'maruku' DataMapper.setup :default, "sqlite://#{Dir.pwd}/development.sqlite3" class Post include DataMapper::Resource property :title, String property :slug_url, String, :key =&gt; true property :desc, String property :content, Text property :project, String property :target_url, Text property :trackback, Integer property :updated_at, String property :created_at, DateTime # A DateTime, for any date you might like. end DataMapper.finalize DataMapper.auto_upgrade! posts = Post.all posts.each do |post| page "/kw/#{post.slug_url}.haml", :proxy =&gt; "/kw/template.haml" do @slug_url = post.slug_url end end </code></pre> <p>and my template.haml just has the following in it: <code>= @slug_url</code></p> <p>When I run <code>middleman build</code> I get no errors, and it seems to work fine, but it doesn't create the kw directory or any of the files that it should. Any ideas on what I am doing wrong here?</p>
    singulars
    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.
 

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