我正在尝试将我的应用程序推送到 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 ruby 1.8.7 gem 1.4.2
我研究了这个网站,发现其他人也有这个问题,但他们使用的是 Rails 3。示例:Heroku push rejected, no Cedar-supported app detected
有什么想法吗?我正在使用这些旧版本,因为我试图集成到的项目正在使用这些版本,所以我试图保持一致。
最佳答案
您需要将 config/environment.rb 中的 config.gem 行移动到 Gemfile 并安装 bundler 。 Rails 2.x 没有对 Bundler 的固有支持,Cedar 要求您使用 Bundler 来指定应用程序的 gem 依赖项。否则它不会将您的应用程序视为 Rails 应用程序。
通过以下方式安装 Bundler for Rails 2.3:
如果您之后还有其他问题,请告诉我们!
关于Rails 2.3.5 拒绝 Heroku Push,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12922903/