I set up the ConfigFile extension exactly(?) as proposed, but I'm getting the following error:
App 32163 stderr: NoMethodError - undefined method `title' for Testing:Class:
app.rb
# Bundler
require "rubygems"
require "bundler/setup"
# Sinatra
require "sinatra/base"
require "sinatra/config_file"
# Mustache und Markdown
require "mustache/sinatra"
require "rdiscount"
# The app
class Testing < Sinatra::Base
register Mustache::Sinatra
register Sinatra::ConfigFile
require './views/layout'
config_file './config.yml'
set :mustache, {
:views => './views',
:templates => './templates'
}
get "/" do
@title = settings.title
@content = markdown(:content)
mustache :index
end
end
config.yml
title: title
Can anybody tell me what I'm doing wrong?