Hi everyone! I have managed to successfuly install Rails port application (following this: http://wiki.openstreetmap.org/wiki/The_Rails_Port tutorial. When I run it under WEBRick server, it runs ok and i can access api. However I cannot make it run under Apache Passenger. Accessing any page I get following error: Your application's database configuration file might be written incorrectly. Please check it and fix any errors. The database server may not be running. Please check whether it's running, and start it if it isn't. Error message: PG::Error: ERROR: relation "oauth_tokens" does not exist LINE 5: WHERE a.attrelid = '"oauth_tokens"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"oauth_tokens"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum (ActiveRecord::StatementInvalid) Exception class: ActiveRecord::StatementInvalid Its weird, because under WEBRick server it works. Can anyone help me solve this issue? I am using Debian 6. thanks! asked 02 Dec '12, 14:33 boksajak |
By default, "rails server" will access your application using the 'development' rails environment, whereas passenger is configured to use the 'production' environment by default. I suspect that your production database isn't configured properly, and that's what's giving you the error above. Check the settings in config/database.yml, and check that the expected tables are already set up. answered 12 Dec '12, 11:52 Andy Allan thanks, I managed to repair production osm database (i needed to run gem install builder before creating database). Now i have a new problem. I still cannot access Rails port application on Apache. I am getting OSM error page with error code 500. Apache log reveals two errors:
(12 Dec '12, 19:48)
boksajak
Did you manage to solve the issue with index.js isn't precompiled?
(20 May '13, 12:26)
bibstha
|