Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8358165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:42:47+00:00 2026-06-09T10:42:47+00:00

I have a Sinatra app which uses DataMapper as it’s ORM, it’s deployed to

  • 0

I have a Sinatra app which uses DataMapper as it’s ORM, it’s deployed to Heroku, but I want to change the database details.

Right now before my Models, I’m connecting to my DB like this, but I want to use a yml file to manage the connections details.

DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3::memory:")

If I have a file thats at config/database.yml, how can I change the DataMapper.setup to use the proper ENV? This way I can remove the need for sqlite3 as I’ll be running Postgres locally too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:42:48+00:00Added an answer on June 9, 2026 at 10:42 am

    As far as I know, DataMapper doesn’t parse .yml. You can look at https://github.com/merb/merb_datamapper/blob/master/lib/merb_datamapper/connection.rb to see how .yml config is consumed in Merb framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Sinatra app, that uses omniauth which constantantly gets this error attack
I have a Sinatra DataMapper app hitting a sqlite3 database that I am attempting
I have a simple sinatra app on Heroku which fetches some json data and
I have got Sinatra/Rails app and an action which starts some long process. Ordinary
In my sinatra app i have a form which is used to submit data
I have a Sinatra::Base webservice which I want to start from a command line
I have created an App on Heroku which works perfectly in a Web Browser.
I have a Sinatra app which would be used by different clients. I wish
I'm deploying a Sinatra app using passenger. The deployed app is working, but not
I have a basic Ruby app that I am building with Sinatra, Datamapper and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.