首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Rails应用程序部署到Heroku时出现应用程序崩溃错误

将Rails应用程序部署到Heroku时出现应用程序崩溃错误
EN

Stack Overflow用户
提问于 2010-12-14 14:59:16
回答 3查看 1.7K关注 0票数 1

我遵循了heroku博客上给出的部署Rails应用程序的所有指南。我也成功地推送了我的应用,并在我的账户中创建了一个应用。但是当我尝试运行我的站点时,它给出了以下错误:

代码语言:javascript
复制
App crashed
This application is temporarily offline.

If you're the administrator of this app, please check your heroku logs for the
backtrace.

我试着检查了日志,结果是这样的

代码语言:javascript
复制
C:\Users\raw\Desktop\html\rohit>heroku logs
Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_
VERSION setting in config/environment.rb for the Rails version you do have installed, or
 comment out RAILS_GEM_VERSION to use the latest version installed.

==> dyno-3674485.log (crash) <==
Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_
VERSION setting in config/environment.rb for the Rails version you do have installed, or
 comment out RAILS_GEM_VERSION to use the latest version installed.

-----> Rails can't find the expected version.

       Check to ensure you have specified the correct version of Rails in your
       Gemfile or .gems.  See http://docs.heroku.com/gems for details.

       You may also be affected by a gem dependency issue with rack.
       See http://docs.heroku.com/gem-dependency for details.

       Examine the backtrace above this message to debug.

我在我的Rails_App目录中创建了一个.gems文件:

代码语言:javascript
复制
rails -v '2.3.8'
pg
rack -v '1.1.0'
haml -v '3.0.13'
formtastic -v '0.9.8'
authlogic -v '2.1.5'
subdomain-fu -v '0.5.4'
compass -v '0.10.2'
compass-colors -v '0.3.1'
paperclip -v '2.3.3'
activemerchant -v '1.9.0'
icalendar

我该怎么做才能让它正常工作呢?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-08-28 14:42:37

我在.gems文件中添加了忽略depedencies的命令-- ignore -depedencies,现在它可以工作了,谢谢您的宝贵时间。

问题解决了。

PS:我一直将这个解决方案作为评论,现在将其作为答案提交。

票数 0
EN

Stack Overflow用户

发布于 2010-12-14 16:16:13

Rails 2.3.8与rack 1.2.1不兼容,你不能像这样定义你的.gems,因为你有一个像define这样的“机架依赖问题”。

尝试使用rake -v=1.1.0 ActionPack 2.3.8 ( http://rubygems.org/gems/actionpack/versions/2.3.8)的依赖项

票数 2
EN

Stack Overflow用户

发布于 2010-12-14 15:18:23

我的Heroku应用程序在竹子-ree-1.8.7堆栈上运行(运行heroku info来确定您正在运行的堆栈),我有以下配置:

我的.gems文件的第一行

代码语言:javascript
复制
rails --version 2.3.8

您可能还需要将以下内容添加到config/environment.rb ment.rb文件中

代码语言:javascript
复制
config.gem 'rails', :version => '2.3.8'

您需要对heroku执行另一次git推送,才能使这些更改生效。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4436692

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档