【问题标题】:why do i get a "Procfile declares types -> (none)" even when i have the correct Procfile?为什么即使我有正确的 Procfile,我也会得到“Procfile 声明类型 ->(无)”?
【发布时间】:2012-08-31 07:06:50
【问题描述】:

我正在尝试通过将这一行添加到 Procfile 来运行 sunspot_solr gem 附带的捆绑 solr:

solr: bundle exec rake sunspot:solr:start

Procfile 用一个小“f”拼写,存在于我的 Rails 根目录中。

我还不能让我的 Procfile 中提到的任何进程在 heroku 上运行。

我已经检查过 StackOverflow 上与同一主题相关的其他问题,所以不要指向我那里:

What is the reason for "Procfile declares types -> (none)" in Heroku?

Procfile declares types -> (none) in Heroku

【问题讨论】:

  • 为了使这个问题成为一个完整的问题,其他人不必去寻找信息,您检查了哪些“其他问题”?您的个人资料是named Procfile with a lower-case 'f' 吗?您之前是否使用可以正常运行其他东西的 Procfile 成功推送到 heroku?你的 Procfile 是 at the base of your project, at the same level as requirements.txt 吗?
  • 感谢 culix,我已经更新了我的问题。
  • 谢谢!当我们有更多信息时,总是更容易提供帮助:)
  • 输入foreman check 会得到什么?它应该说类似valid procfile detected (solr)
  • 明白了。 $ foreman check valid procfile detected (solr)

标签: heroku sunspot foreman cedar


【解决方案1】:

通常是 Heroku expects at least one process named web in your Procfile:

Cedar 堆栈上的所有语言和框架都声明了一个 Web 进程类型,它启动了应用程序服务器。

如果您将 Procfile 更改为这样,您的程序是否会运行 -

web: bundle exec rake sunspot:solr:start

?

我不确定在推送之后仅仅看到Procfile declares types -> (none) 是否意味着存在错误——Heroku 'Getting Started with Rails' article 在开始时也有该输出;他们只是稍后更改他们的 Procfile 以运行 web 进程。

【讨论】:

  • 我确信这不起作用,因为您要求 heroku 将 solr 作为 Web 进程启动,因此它不会启动默认的 Web 进程。所以我尝试了:web: bundle exec rails server -p $PORT solr: RAILS_ENV=production bundle exec rake sunspot:solr:start。这也失败了。
  • 您的websolr 定义是否在不同的行上?你之前有声明过web 进程吗?随着您的web 进程声明,heroku 现在是否说Procfile declares types -> (none) 以外的其他内容?
  • web 和 solr 在不同的行上。即使使用 Procfile 中提到的 web 进程,heroku 也不会检测到它。
猜你喜欢
  • 1970-01-01
  • 2021-05-24
  • 2011-09-14
  • 2020-10-04
  • 2012-07-17
  • 2016-01-24
  • 2013-08-06
  • 2019-09-27
  • 2016-03-04
相关资源
最近更新 更多