Rails Mysql

software development

#1

I can’t connect to mysql, I am Creating a rails app on Highland.
I have checked my settings and still can’t connect I think it may be down to the mysql gem on highland.
Anyone using Rails and Mysql sucessfully on Highland?

I am at a complete loss, support has given up on me : -

The details look fine - unfortunately it’s not our code (the rails) but
we actively watch for stable releases so if there is a patch or fix we’ll
most likely install it once we know it won’t cause any other problems. If
you find a recommended solution I can pass that to the dev team too.

Thanks!

John

Any thoughts.

Craig Jones


#2

I’d guess it isn’t a mysql gem issue as DH uses scripts to configure all their servers and it seems unlikely they mangled just one machine.

Can you connect to your database using PHPMyAdmin? Just to be sure it’s alive and well.

Do you know what mode your app is in? If you’ve done nothing to set it yourself (in environment.rb), it will be running in production mode on DreamHost. Make sure your database.yml has a good setting for production.

-Tom

-Tom Wilcoxen
convergent arts


#3

Indeed I can.
The settings are all good, I can connect to my db in php and using the command line.
The app in in production and the database.yml is correct ( verified by John in Techsupport.)
Heres the link to see the failure, http://www.macrepublic.com


#4

Here’s a bit to test your connection outside of Rails:

[code]require 'rubygems’
require ‘active_record’

ActiveRecord::Base.establish_connection(
:adapter => “mysql”,
:host => “db.xyz.com”,
:username => “user”,
:password => “pass”,
:database => “dbname”)

class Person < ActiveRecord::Base

def initialize
puts "init"
super
end

end

t = Person.new
[/code]Change the name of the class to the name of one of your db tables. If the connection works you’ll see no errors. If not, you’ll get an error that should help to see what’s happening.

-Tom Wilcoxen
convergent arts