Heroku Cedar 上的静态网站

发布于 2025-01-02 18:46:40 字数 1135 浏览 6 评论 0原文

我尝试按照此处的说明在 Heroku 上创建静态网站雪松栈。

我已将网站放在此处

当我尝试推送应用程序(使用“git push heroku master”)时,出现以下错误:

Kushs-MacBook-Air:hgtr kushpatel$ git push heroku master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.29 KiB, done.
Total 7 (delta 1), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
 !     Heroku push rejected, no Cedar-supported app detected

To [email protected]:gentle-warrior-1301.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:gentle-warrior-1301.git'

非常感谢任何帮助。我使用的是最新的 ruby​​/rack/heroku

I tried following the instructions here in order to create a static website on Heroku's Cedar stack.

I have put the site up here.

When I try to push the app (using "git push heroku master"), I get the following error:

Kushs-MacBook-Air:hgtr kushpatel$ git push heroku master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.29 KiB, done.
Total 7 (delta 1), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
 !     Heroku push rejected, no Cedar-supported app detected

To [email protected]:gentle-warrior-1301.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:gentle-warrior-1301.git'

Any help is greatly appreciated. I am on the latest ruby/rack/heroku

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谢绝鈎搭 2025-01-09 18:46:40

该说明适用于已安装机架的竹堆 - 雪松堆完全是空的,因此您需要安装机架。

您需要添加一个 Gemfile 并

source :rubygems

gem 'rack'

bundle它,然后将 Gemfile 和 Gemfile.lock 添加到 git 并重新推送。

The instructions are for Bamboo stack which would have had Rack installed - the Cedar stack is entirely empty so you need to have rack installed.

You need to add a Gemfile with

source :rubygems

gem 'rack'

bundle it and then add the Gemfile and Gemfile.lock to git and repush.

伤痕我心 2025-01-09 18:46:40

这些说明适用于 Bamboo 堆栈。

cedar 堆栈需要一个 Procfile 才能确定如何运行您的应用程序。

你的 Procfile 中类似的东西应该可以解决问题 - 假设你使用的是 slim:

web: bundle exec thin start -p $PORT -e $RACK_ENV

Those instructions are for the Bamboo stack.

The cedar stack needs a Procfile to be able to identify how to run your app.

Something like this in your Procfile should do the trick - assuming you're using thin:

web: bundle exec thin start -p $PORT -e $RACK_ENV
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文