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.
Are there any obvious reasons this might be happening?
Right now the code is really simple:
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
Local file structure is:
TIL (folder)
- app.rb
- Gemfile
- Procfile
- public (folder)
- AL-thumbnail.png
- BP-thumbnail.png
- GD-thumbnail.png
- logo.png
- styles.css