
Question:
I am relatively new to Heroku and Rails. I have pushed a small "app" to Heroku before which worked fine.
Now I have developed a bit of a larger application on my desktop pc, which runs fine using my rails server as localhost.
When I try migrating it to Heroku I get the following message:
Application Error
=================
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
I started looking at the log files, but they don't really tell me anything. Can someone please give me a hint on how to interpret them. I think the last to logfile lines are the ones that crash the application:
2013-08-12T17:54:56.944875+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.3.2/lib/bundler/rubygems_integration.rb:224:in `block in replace_gem': can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.1. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
<strong>EDIT: I've now added the complete 'heroku logs' prompt output. Any suggestions on what to look for. I'm very unfamiliar with the log output, don't really know where to start.</strong>
<strong>EDIT 2: Thanks for all the help so far! I've got the app working now. The following was the problem</strong>
In my gem file I had ByCrypt linked in like this:
gem 'bcrypt-ruby', :require => 'bcrypt'
Since the Heroku logs said something about
can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.1.
I changed my Gemfile to
gem 'bcrypt-ruby', '~> 3.0.0'
This helped! The app is now running on heroku. But I think I now have a problem with the methods using bcrypt... but I will have to investigate this seperately. Thanks for the help!
Answer1:have you migrated the database?
like this: heroku run rake db:migrate
if that dosn't work use this:
run heroku logs, and paste the log here
2013-08-12T17:54:56.944875+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.3.2/lib/bundler/rubygems_integration.rb:224:in `block in replace_gem': can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.1. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
maybe you forgot to add a gem explicity in your gemfile,