0
タイトルによれば、私はHerokuに私の公的資産を使用させることはできません。公開ディレクトリがSinatraで提供されていない
ローカルでは、私のアプリをshotgun
で実行すると動作します。しかしrackup
(Herokuのは、使用するもの)、CSSと資産404
と私はここでの回答(one、two、three)の束を試したが、どれも働いていません。
マイconfig.ru:
require 'bundler'
Bundler.require
require File.expand_path('../config/environment', __FILE__)
run BikeShareApp
そして、私のコントローラ:
class BikeShareApp < Sinatra::Base
get '/' do
erb :'home/index'
end
get '/stations' do
@stations = Station.all
erb :'stations/index'
end
end
編集:ここでは
は私のディレクトリ構造だこれは私が参照してる方法です私の資産は道で
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/overwrite.css" rel="stylesheet">