将 Rails 应用程序部署到 Heroku 时出现 App Crashed 错误

发布于 2024-10-07 04:30:40 字数 1614 浏览 2 评论 0原文

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

App crashed
This application is temporarily offline.

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

我尝试检查日志,这就是我得到的结果

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 文件:

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

我能做什么让它发挥作用吗?

I followed all the guidelines given on the heroku blog for deploying a Rails app. I also my app got pushed successfully and created an app in my account. But when I try to run my site it gives me the following error:

App crashed
This application is temporarily offline.

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

I tried to check the logs and here's what I got

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.

II have made a .gems file in my Rails_App directory:

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

What can I do to get this to work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

够运 2024-10-14 04:30:40

Rails 2.3.8 与rack 1.2.1 不兼容。您无法像define 那样定义.gems,因为您有“rack 的gem 依赖问题”。

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

Rails 2.3.8 is not compatible with rack 1.2.1 You can't define you .gems like that you have a "gem dependency issue with rack" like define.

Try with rake -v=1.1.0 the dependency of ActionPack 2.3.8 ( http://rubygems.org/gems/actionpack/versions/2.3.8)

夜空下最亮的亮点 2024-10-14 04:30:40

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

我的 .gems 文件的第一行

rails --version 2.3.8

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

config.gem 'rails', :version => '2.3.8'

您将需要再次执行 git Push 到 heroku 才能使这些更改生效。

My Heroku app, running on bamboo-ree-1.8.7 stack, (run heroku info to determine what stack you are running), I have the following configuration:

first line of my .gems file

rails --version 2.3.8

You may also need to add the following to your config/environment.rb file

config.gem 'rails', :version => '2.3.8'

You will need to do another git push to heroku for these changes to take effect.

屋顶上的小猫咪 2024-10-14 04:30:40

我添加了忽略 .gems 文件中依赖项的命令 --ignore-depedcies,现在它可以工作了,感谢 Guyz 的宝贵时间。

问题解决了。

PS:我将解决方案保留为评论,现在将其作为答案提交。

I added the command to ignore depedencies in the .gems file as --ignore-depedencies and now it works thanks guyz for your time.

The issue is solved.

PS: I had kept the solution as a comment, now submitting it as an answer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文