如何将模块化Sinatra应用程序部署到Heroku? [英] How to deploy a modular Sinatra app to Heroku?

查看:96
本文介绍了如何将模块化Sinatra应用程序部署到Heroku?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,我无法访问公共目录中的任何文件。未找到错误。显然,我并没有在网址中放置 public 部分。

For some reason, I can't access any files in the public dir. Not found error. I'm not putting the public part in the URL, obviously.

查看在GitHub上爱好者源代码库

推荐答案

甜。我解决这个问题。阅读 Sinatra配置后,我将这一行添加到我的应用程序类中:

Sweet. I fixed this. After reading about Sinatra Configurations, I added this line to my application class:

set :root, Lovers.root

有效!

这篇关于如何将模块化Sinatra应用程序部署到Heroku?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆