【问题标题】:Heroku Push Rejected for Rails 2.3.5Heroku Push 被 Rails 2.3.5 拒绝
【发布时间】:2012-10-07 00:53:33
【问题描述】:

我正在尝试将我的应用程序推送到 Heroku,但被拒绝了。这是我收到的错误消息。

Counting objects: 63, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (56/56), done.
Writing objects: 100% (63/63), 80.06 KiB, done.
Total 63 (delta 10), reused 0 (delta 0)

-----> Heroku receiving push
 !     Heroku push rejected, no Cedar-supported app detected

To git@heroku.com:agile-shelf-2850.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:agile-shelf-2850.git'

我的应用是简单的 hello world 应用,我正在使用以下内容:

导轨 2.3.5 红宝石 1.8.7 宝石 1.4.2

我研究了该网站,发现其他人有这个问题,但他们使用的是 Rails 3。示例:Heroku push rejected, no Cedar-supported app detected

有什么想法吗?我正在使用这些旧版本,因为我正在尝试集成的项目正在使用这些版本,所以我试图保持一致。

【问题讨论】:

  • 存储库的根目录中有哪些文件? Gemfile 向 Heroku 表示您是 Ruby 应用程序,config.ru 表示您使用 Rack,config/environment.rb 没有 config/application.rb 表示 Rails 2。
  • 嗨!感谢您的答复。我没有 config.ru,也没有 Gemfile。我也没有config.ru。我确实有一个没有 config/application.rb 的 config/environment.rb,所以我相信我的 hello world 应用程序是 Rails 2。
  • 您需要Gemfileconfig.ru。你是如何得到一个没有这些文件的 Rails 2.3 应用程序的?
  • 尝试运行bundle install

标签: heroku ruby-on-rails-2


【解决方案1】:

您需要将 config/environment.rb 中的 config.gem 行移动到 Gemfile 并安装捆绑程序。 Rails 2.x 没有对 Bundler 的固有支持,Cedar 要求您使用 Bundler 来指定应用程序的 gem 依赖项。否则,它不会将您的应用视为 Rails 应用。

通过以下方式安装 Bundler for Rails 2.3:

http://gembundler.com/v1.3/rails23.html

如果您之后有其他问题,请告诉我们!

【讨论】:

    猜你喜欢
    • 2016-06-02
    • 1970-01-01
    • 2012-12-29
    • 2017-12-29
    • 2013-03-22
    • 2013-01-20
    • 2010-12-21
    • 2012-05-27
    • 1970-01-01
    相关资源
    最近更新 更多