Note that there are some explanatory texts on larger screens.

plurals
  1. POSinatra public assets not available when uploading to Heroku
    primarykey
    data
    text
    <p>I've just started working on a simple Sinatra app and when uploading it to Heroku. None of the files in the public folder seem to be available but it works fine locally.</p> <p>Are there any obvious reasons this might be happening?</p> <p>Right now the code is really simple:</p> <pre><code>require 'rubygems' require 'sinatra' require 'bundler/setup' require 'haml' require 'rdiscount' set :static, true set :public_folder, "#{File.dirname(__FILE__)}/public" get '/' do haml :landing end __END__ @@ layout %html %head %meta{charset: "utf-8"}/ %meta{content: "width=device-width, initial-scale=1.0", name: "viewport"}/ %meta{content: "", name: "description"}/ %meta{content: "", name: "author"}/ %title TIL %link{href: "http://yui.yahooapis.com/pure/0.3.0/pure-min.css", rel: "stylesheet"} %link{rel: "stylesheet", href: "/styles.css"} %body = yield @@landing %section.hero .container .pure-g-r .pure-u-1 .logo ... .container %hr/ .pure-g-r .pure-u-2-3 .padding-box :markdown ... .pure-u-1-3 .padding-box .. %hr/ .pure-g-r .pure-u-1 .padding-box :markdown ... %hr/ .pure-g-r .pure-u-1 .padding-box %h2 ... .pure-u-1-3 .padding-box %img.img-rounded{src: "GD-thumbnail.png"}/ :markdown ... .pure-u-1-3 .padding-box %img.img-rounded{src: "AL-thumbnail.png"}/ :markdown ... .pure-u-1-3 .padding-box %img.img-rounded{src: "BP-thumbnail.png"}/ :markdown ... %hr/ %footer .row .col-lg-12 %p </code></pre> <p>Local file structure is:</p> <pre><code>TIL (folder) - app.rb - Gemfile - Procfile - public (folder) - AL-thumbnail.png - BP-thumbnail.png - GD-thumbnail.png - logo.png - styles.css </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