title: How do I tell Sinatra what environment (development, test, production) it is?
body: <p>(Disclaimer: New to deploying Sinatra on Heroku.) </p>
  
  <p>I have seen <a href="http://www.sinatrarb.com/configuration.html" rel="noreferrer">http://www.sinatrarb.com/configuration.html</a> and it tells me to <code>set :environment, :production</code>. My question is, how can I specify it to do: "when in Heroku, set environment as production, else stay in test/development."</p>
  
  <p>Also, even after putting the line <code>set :environment, :production</code>, I don't think it is working because when I try to <code>rackup</code> the app locally, it's still running (when I know (or I think I know) that it shouldn't because I haven't installed postgres on my computer).</p>
  
  <p>Gemfile </p>
  
  <pre><code>group :production do
    gem 'dm-postgres-adapter'
  end
  
  group :development, :test do
    gem 'dm-sqlite-adapter', "~&gt; 1.2.0"
  end
  </code></pre>