Getting App Crashed error when deploying Rails application to Heroku
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?
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)
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.
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.
精彩评论