NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

boksajak
11112
accept rate: 0%


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.

permanent link

answered 12 Dec '12, 11:52

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

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:

  1. ActionView::Template::Error (index.js isn't precompiled)

  2. ActionController::RoutingError (No route matches [GET] "/assets/osm_logo.png")

(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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×69
×20
×18
×8
×1

question asked: 02 Dec '12, 14:33

question was seen: 5,083 times

last updated: 20 May '13, 12:26

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum