How do I connect to an external database?
I am trying to connect to an external DB to gather data. Usually I do
this by creating a class that connects to the db using the
database.yml file:
class MyOutsideTable < ActiveRecord::Base
establish_connection :my_outside_table_connection
end
If there is no database.yml file, I can USUALLY do something like
this:
class MyOutsideTable < ActiveRecord::Base
establish_connection(
:adapter => 'mysql',
:host => 'public_ip_of_server',
:database => 'dbname',
:username => 'username',
:password => 'password'
)
end
So... I tried this and it seems to shutdown my mongrel server. I open
a terminal and type in "test = MyOutsideTable.new"
and get the message "Your mongrel is not responding, check to see if
there is a crash log."
No logs, and now you can't view the application.
Thoughts?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---