Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I deploy Sinatra + mustache onto Heroku?
    primarykey
    data
    text
    <p>I have a really basic Sinatra site working locally. I am using the "rackup" thing, where you define a <code>config.ru</code> like this: </p> <pre><code>require './web' use Rack::ShowExceptions run App.new </code></pre> <p>And then in the terminal you can run 'rackup' and a web server is fired up and all is well.</p> <p>However, when I deploy this to heroku I don't get any error messages, but, when I visit the site, it says the standard "Sinatra does not know this ditty" error. </p> <p>Here is a snippet of my <code>web.rb</code> in case it helps:</p> <pre><code>require 'sinatra' require 'maruku' require 'mustache/sinatra' require 'nokogiri' class App &lt; Sinatra::Base register Mustache::Sinatra require './views/layout' set :mustache, { :views =&gt; './views/', :templates =&gt; './templates/' } get '/' do "FUUUUUUUUUUUUU" end </code></pre> <ul> <li>Edit</li> </ul> <p>Looking at the heroku logs, it <em>appears</em> like sinatra starts and then stops; it doesn't keep running. Then when someone makes a request obviously the server returns a 404</p> <pre><code>2012-01-20T12:39:23+00:00 app[web.1]: == Sinatra/1.1.0 has taken the stage on 16662 for development with backup from Thin 2012-01-20T12:39:23+00:00 app[web.1]: &gt;&gt; Thin web server (v1.2.7 codename No Hup) 2012-01-20T12:39:23+00:00 app[web.1]: &gt;&gt; Maximum connections set to 1024 2012-01-20T12:39:23+00:00 app[web.1]: &gt;&gt; Listening on 0.0.0.0:16662, CTRL+C to stop 2012-01-20T12:39:23+00:00 app[web.1]: == Sinatra has ended his set (crowd applauds) 2012-01-20T12:39:23+00:00 app[web.1]: 2012-01-20T12:39:23+00:00 app[web.1]: &gt;&gt; Stopping ... 2012-01-20T12:39:23+00:00 heroku[web.1]: Process exited 2012-01-20T12:39:24+00:00 heroku[router]: GET young-river-2245.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=48ms status=404 bytes=409 </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.
 

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