Something went wrong.

My app works fine in development on my laptop but in production on my server I get "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."

I am using Rails 3, Ruby 1.8.7, Apache and passenger 2.2.15

I get the welcome aboard page in production if I just go to the domain name but as soon as I want data I get the above error. There are no messages in any logs for apache or rails. In production.rb I have config.log_level = :debug

cap deploy:migrate works fine with this code in deploy.rb

namespace :deploy do task :restart do run "touch #{current_path}/tmp/restart.txt" end task :seed do run "cd #{current_path}; rake db:seed RAILS_ENV=production" end end

How can I test that my app is running in the production environment on my server?

I finally found this in log/production.log

Started GET "/sports_orgs" for 120.146.245.33 at Wed Jul 21 23:00:35 -0700 2010

LoadError (no such file to load -- pg): /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/dependencies.rb:212:in `require'

However, when I installed the gem the error still occurs and gem -v pg returns 1.3.7

did you restart your web server?

Ben Bruscella wrote:

did you restart your web server?

Many times :slight_smile:

Also I uninstalled and reinstalled the pg gem as well. I also installed ruby-pg and postgres gems.

What did you do to make the previous error with pg go away?

Show us the error trace and the code around where the error occurs in your code Also please the relationships between any relevant models.

Colin

Colin Law wrote:

I have no method or test named assert_valid_keys

What did you do to make the previous error with pg go away?

I believe that may have been an earlier error and was genuine. I did install pg again.

Show us the error trace and the code around where the error occurs in your code Also please the relationships between any relevant models.

class Card < ActiveRecord::Base   belongs_to :players, :games

Colin Law wrote:

I have no method or test named assert_valid_keys

What did you do to make the previous error with pg go away?

I believe that may have been an earlier error and was genuine. I did install pg again.

Show us the error trace and the code around where the error occurs in your code Also please the relationships between any relevant models.

class Card < ActiveRecord::Base belongs_to :players, :games

Try belongs_to :players belongs_to :games

Colin

If you look at the docs for belongs_to you will see that belongs_to :model1, :model2 is not valid code. It is a pity that rails is not able to give a better error message for this however. (I found it by googling for your error message by the way. Google is often much quicker than asking for help).

Colin