将 Rails 应用程序推送到 heroku 不起作用
我正在尝试使用 git Push heroku master 将我的 Rails 3 应用程序上传到 Heroku,但我不断收到以下错误:
-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Rails app detected
! Heroku Bamboo does not include any Rails gems by default.
! You'll need to declare it in either .gems or Gemfile.
! See http://docs.heroku.com/gems for details on specifying gems.
! Heroku push rejected, no Rails gem specified.
error: hooks/pre-receive exited with error code 1
我尝试删除 Heroku 网站上的 并重新开始,我也尝试清除我的 git repo 并再次执行 init,但我不断收到相同的错误。我的 Gemfile 如下:
source :rubygems
gem 'rails', '3.0.3'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'devise', '1.1.3'
gem 'acts-as-taggable-on'
gem 'ruby-debug'
# for sass
gem 'haml'
gem 'mocha'
gem 'ruby-pg'
我已经运行捆绑包将宝石打包到供应商缓存中,但它似乎没有改变结果。
我从 Rails 2.3 升级了这个应用程序,所以我想知道这是否与它有什么关系?
I'm trying to use git push heroku master to upload my rails 3 app to heroku, but I keep getting the following error:
-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Rails app detected
! Heroku Bamboo does not include any Rails gems by default.
! You'll need to declare it in either .gems or Gemfile.
! See http://docs.heroku.com/gems for details on specifying gems.
! Heroku push rejected, no Rails gem specified.
error: hooks/pre-receive exited with error code 1
I've tried deleting the on the heroku website and starting again, i've also tried wiping out my git repo and doing init again, and I keep getting the same error. My Gemfile is as follows:
source :rubygems
gem 'rails', '3.0.3'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'devise', '1.1.3'
gem 'acts-as-taggable-on'
gem 'ruby-debug'
# for sass
gem 'haml'
gem 'mocha'
gem 'ruby-pg'
I've run bundle package to package teh gems into vendor cache, but it doesn't seem to change the result.
I upgraded this app from rails 2.3, so i'm wondering if that has anything to do with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我从 Heroku 得到的答案:
嗨,
问题似乎是你的 Gemfile 被称为 GemFile。虽然这适用于 Mac 等某些平台,但不适用于严格区分大小写的文件系统,例如我们的系统。
为了在 HFS 或 NTFS 等保留大小写、不区分大小写的文件系统中重命名文件,您需要分两步进行:
This is the answer I got from Heroku:
Hi,
The problem seems to be that your Gemfile is called GemFile. While that'll work on some platforms like the Mac, that won't work on a strictly case-sensitive filesystem, such as ours.
In order to rename the file in a case-retaining, case-insensitive file system like HFS or NTFS, you'll need to do it in two steps:
尝试将这些添加到您的
Gemfile
Try adding these to your
Gemfile