"We're sorry, but something went wrong." from RoR app

Hi All,

“We’re sorry, but something went wrong.” is the message I got when I
started up an RoR app in the environment:

Rails 2.3.5
Ruby 1.8.6
WinXP-Pro/SP3
Firefox 3.6
MySQL 5.0.37-community-nt
Mongrel

The app under development was working fine until I (stupidly) thought
I needed to upgrade MySQL to 5.1.44.

I took the precaution of MySQL-dumping
the development db before upgrading. Then I ran into problems which
led me to switch back to a clean install of 5.0.37 and reboot.

I used MySQL to reinstall the development db and tested it
successfully under the MySQL client.

I started up Mongrel and ran my app using localhost:3000, getting the
captioned message.

The development log is presented below. Suggestions are extremely
welcome.

Thanks in Advance,
Richard

Development.log

/!\ FAILSAFE /!\ Fri Mar 12 13:42:10 -0500 2010
Status: 500 Internal Server Error
Unknown database ‘rts_development’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/
mysql_adapter.rb:589:in real_connect' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/ mysql_adapter.rb:589:inconnect’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/
mysql_adapter.rb:203:in initialize' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/ mysql_adapter.rb:75:innew’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/
mysql_adapter.rb:75:in mysql_connection' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/abstract/ connection_pool.rb:223:insend’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_pool.rb:223:in new_connection' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/abstract/ connection_pool.rb:245:incheckout_new_connection’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_pool.rb:188:in checkout' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/abstract/ connection_pool.rb:184:inloop’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_pool.rb:184:in checkout' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/1.8/monitor.rb:242:insynchronize’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_pool.rb:183:in checkout' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/abstract/ connection_pool.rb:98:inconnection’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_pool.rb:326:in retrieve_connection' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/abstract/ connection_specification.rb:123:inretrieve_connection’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/connection_adapters/abstract/
connection_specification.rb:115:in connection' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/query_cache.rb:9:incache’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
activerecord-2.3.5/lib/active_record/query_cache.rb:28:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.3.5/lib/active_record/connection_adapters/abstract/ connection_pool.rb:361:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rack-1.0.1/lib/rack/head.rb:9:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rack-1.0.1/lib/rack/methodoverride.rb:24:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ actionpack-2.3.5/lib/action_controller/params_parser.rb:15:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in
call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ actionpack-2.3.5/lib/action_controller/failsafe.rb:26:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rack-1.0.1/lib/rack/lock.rb:11:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rack-1.0.1/lib/rack/lock.rb:11:insynchronize’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rack-1.0.1/lib/rack/lock.rb:11:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
actionpack-2.3.5/lib/action_controller/reloader.rb:34:in run' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rails-2.3.5/lib/rails/rack/static.rb:31:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rack-1.0.1/lib/rack/urlmap.rb:46:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rack-1.0.1/lib/rack/urlmap.rb:40:in each' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rack-1.0.1/lib/rack/urlmap.rb:40:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rack-1.0.1/lib/rack/content_length.rb:13:incall’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rack-1.0.1/lib/rack/chunked.rb:15:in call' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rack-1.0.1/lib/rack/handler/mongrel.rb:64:inprocess’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in process_client' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:ineach’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in process_client' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:inrun’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in initialize' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:innew’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in run' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:ininitialize’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in new' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:inrun’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/
rack-1.0.1/lib/rack/handler/mongrel.rb:34:in run' K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ rails-2.3.5/lib/commands/server.rb:111 K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:ingem_original_require’
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `require’
script/server:3

RichardOnRails wrote:

Hi All,

“We’re sorry, but something went wrong.” is the message I got when I
started up an RoR app in the environment:

Rails 2.3.5
Ruby 1.8.6
WinXP-Pro/SP3
Firefox 3.6
MySQL 5.0.37-community-nt
Mongrel

The app under development was working fine until I (stupidly) thought
I needed to upgrade MySQL to 5.1.44.

http://trevoke.net/blog/2009/09/25/fix-for-windows-rails-2-2-mysql-5-1-error/

I think you may have a similar issue. The post may not solve your issue,
but it should get you going in the right direction.

Try reinstalling mysql gem!

On Sat, Mar 13, 2010 at 1:07 AM, Aldric G.
[email protected]wrote:

MySQL 5.0.37-community-nt
but it should get you going in the right direction.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Sandip


Hi Aldric & Sandip,

Thanks for your ideas. It’s great to have friends around the world.

After I posted the message, I went on a bug hunt that, after two
hours, revealed that the message should have been supplemented with:
Database “RTS_Development” does not exist". Then I would have known
that my restoration of the development database was mis-named. The I
would have exported the bad and renamed my import.

But alas, I had to find this out for myself. There was no way I
could have posted all the details of my misadventure to y’all so that
you’d have a chance at spotting my error.

So, again, thanks. I’m OK for now, but another problem will crop up
soon, no doubt.

Best wishes,
Richard

On Mar 12, 2:30 pm, RichardOnRails

Check out yours database and table is they are fine ?
and if possible rebuilt app
or
reconfigure database.yml

thanks its about database connectivity issue i think

Thanks:
Rajeev sharma

I’ve got the entire application back to where I was before I thought
upgrading MySQL might be the solution to my problem.

The problem was that I added an expense item which included an amount,
say 10.50. After saving the new item, the expense amount displayed
as simply 10 – no .50 anywhere. I finally realized my problem was
scale=0 for my amount column.

I generated/edited this migration to fix my problem. Do you think it
will work if I use rake to apply it?

class ChangeExpenseTblAmountCol < ActiveRecord::Migration
def self.up
class Expense
change_column :amount, decimal :precision=>10, scale=>2
end
end

def self.down
end
end

Or should I have simply changed the class name (which is simply the
name I gave to the generator).
I’m running Rails 2.3.5, Ruby 1.8.6 and MySQL 5.0.37-community-nt

Richard,

Straight to the point.

There are a few ways to get out of this problem, most of them driving
you to a MySQL DLL downgrade.

IMHO, the fact is MySQL 5.1 doesn’t work properly with RoR, so, stick
with 5.0, report the problem to MySQL staff and wait for: an official
patch for 5.1, or for the 5.2 hoping it will solve the problem.

That is it.

Pleas check your routes.rb file and configure your map.root
parameter. You can use the tutorial below or assistance.

tutorial: Getting Started with Rails — Ruby on Rails Guides see
section 4