this is the thing: Having a web application working on heroku, i built an api that should use the same database in order to feed mobile apps.
I used this solution to set the api's database_url like the web database_url, and it worked fine. Thou there's still also a default database heroku creates with the app. This is what "heroku config --app my_app" shows:
DATABASE_URL: (..web database_url..)
HEROKU_POSTGRESQL_RED_URL: (..heroku default url..)
LANG: en_US.UTF-8
RACK_ENV: production
RAILS_ENV: production
SECRET_KEY_BASE: ...
Anyway, the api works fine locally when i do this:
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://my_app.herokuapp.com/users/sign_in -d '{"user": {"email": "my_user@gmail.com", "password": "my_password"}}'
But when i try the same thing on heroku it shows the Error:
{"status":"500","error":"Internal Server Error"}
First time im trying something like this, so im not sure where to check. I'd appreciate any help.
UPDATE
This is the result of heroku logs:
2015-01-16T18:13:22.993278+00:00 heroku[router]: at=info method=POST
path="/users/sign_in" host=helphy-api.herokuapp.com
request_id=23c47ee1-88aa-4ac8-a607-efee0a121c4c fwd="190.15.201.45"
dyno=web.1 connect=1ms service=156ms status=500 bytes=330
Thanks in advance