Will
Will

Reputation: 4705

How do I set the production / development environment when running a Sinatra App localy

I have the following in my Gemfile, but when i run bundle install on my local, i get an error about postgres being unavailable.

group :development do
  gem 'dm-sqlite-adapter'
end

group :production do
  gem 'dm-postgres-adapter'  
end

Upvotes: 1

Views: 134

Answers (1)

Andrew Marshall
Andrew Marshall

Reputation: 96914

You need to tell Bundler to exclude the production group:

bundle install --without production

It will remember this for future runs on the same machine (it stores this in the .bundle directory), so you only need to do this once and then can simply do bundle or bundle install in the future.

Upvotes: 1

Related Questions