Before updating scaffolding from new db schema

I created my model and used set_table_name to point to the correct table in the DB.I could do a :scaffold in the controller and everything worked fine.

before updating scaffolding from new db schema-89before updating scaffolding from new db schema-83

For example, Order.has_many :lines rather than Order.has_many :order_lines.

[FIXED] Temporary work-around for HABTM associations: The code no longer barfs but you'll need to define the association manually.

Still working on automatically generating the association but needed to get a fix out quickly. If classes are named ' Abstract Xxx' they will be treated as abstract.

PGError: ERROR: Option 'search_path' is not recognized : SHOW search_path Yes it pops with this error but the table was SUCCESSFULLY created! Also, I tried one of the suggestions here at the forum of hardcoding my connection in my models: class Service Spiels note that I can successfully connect to my db using with the follwing line: dbh = DBI.connect("dbi: Pg:db:", "username", "mypassword") I can successfully connect to my db but I can't get rails to get up!

--- then make sure that your database.yml: - uses spaces NOT tab characters - has the correct host spec - has the correct port/socket spec - has the correct schema_search_path if it is not 'public' Craig Are we talking about the remote server ip and postgres port? I've been able to connect to the db using ruby. I am still using a Postgres 7.2.2 which may not exactly have public pretty darn long tunnel I'm finding myself in, light is getting farther and farther!

Leave a Reply