ruby - Need help deploying a sinatra app to heroku using data mapper, no tables getting created -


I'm trying to deploy a small app for it. The deployment of work is fine, and it runs without a problem in my local environment, however, crashes immediately after throwing an "application error" in the production in the app.

I suspect that the problem is that no database tables are being created (when I see statistics on hekura / sql tables: 0). I do not know why code requires

  'Sinatra' requires 'haml' 'data_mapper' is required "date" is required "postgraduate" category GitHub  

from my app.rb file is on the snapshot Note: DataMaper :: resource includes the property: ID, serial property: content, text,: = required; True estate: location, integer property: created_at DATETIME, property: updated_at DATETIME, finally configure DataMapper.setup (: default, ENV [ 'postgres: // coeastaxltnwlx: JnO2uo9HyracxQQ86n49u-FlzE@ec2-54-204-40-96.compute -1.amazonaws.com:5432/d7n7n4iggsqnke '] || "sqlite3: // # {Dir.pwd} /development.db") Detamaprkfinlaijhkoto_apgred! End

and from the gem file

  source "https://rubygems.org" ruby ​​"2.1.2" gem "sin" gem " thin "gem" haml "gem 'data_mapper' gem" PG "gem" dm-postgres- adapter " 

over the error message here I get $ Heroku log

  2014-10-27T10: 55: 48.5 9 1707 + 00: 00 Heroku [web.1]: Exited with the status of the process 1 2014-10-27T10: 55: 48.600652 + 00: 00 Heroku [web.1]: Changing from state start to crash 2014-10-27T10: 55: 55.6 9 770 + 00: 00 Heroku [router]: on = tru Procedure Code = H 10 desc = "application crashed" method = path = "/" host = Brbra- waters- 2400.herokuapp.com REQUEST_ID = 1a3e9d90-c9f2-4cdc-842b-55d3152089ba FWD = "83.64.207.92" dyno = connect = Service = status = 503 bytes = 2014-10-27T10: 55: 56.508412 + 00: 00 Heroku [router]: on = error code = H10 desc = "app crashes" method = gate path = "/ favicon.ico "host = murmuring -waters-2400.herokuapp.com request_id = d83bdf15-c09c-4919-ab05-30b862199323 fwd =" 83.64.207.92 "witch = connect = Service = status = 503 bytes = 2014-10-2 7T10 : 56: 06.872347 + 00: 00 Heroko [Router]: AR = Error code = H10Did = "app crash" method = GET path = "/" host = murmur-water -2 400.Herokup dot request _id = 2e4a1984-c1ea -4234-8331-3f6a6f217137 fwd = "54.161.222.26" dyno = connect = service = condition = 503 bytes =  

Any help is greatly appreciated!

I think the problem is in the DataMapper.setup method call. You are viewing the database url in the ENV object (the collection of environment variables) which is good, but instead of passing the name of the environment variable ( DATABASE_URL ) you have copied The real url you should put it in your code

Try doing something like this:

  DataMapper.setup (: default, ENV ['DATABASE_URL']] "sqlite3: // # {Dir.pwd} / Development.db ")  

Comments