Sinatra + Heroku + Datamapper deploy issues with dm-sqlite-adapter

后端 未结 2 1660
悲哀的现实
悲哀的现实 2021-02-10 04:07

For some reason, heroku tries to require dm-sqlite-adapter, even though it should use Postgres here. Note, that this happens when I open any URL - not during the git push itself

2条回答
  •  [愿得一人]
    2021-02-10 04:48

    Try doing DataMapper.setup(:default, ENV['DATABASE_URL'] || 'postgres://user:password@hostname/data/mydatabase.db') instead. Heroku is probably looking at the protocol, and therefore requiring SQLite’s dependencies.

提交回复
热议问题