I have a Sinatra application and I'm trying to use groups in my Gemfile in order to load only specified gems. But, when I restrict loading to just one group bundler still loads every gem in the file. Here's my Gemfile:
source 'https://rubygems.org'
group :one do
gem 'sinatra'
end
group :two do
gem 'bitly'
end
And here's my application:
require 'bundler/setup'
Bundler.require(:one)
class App < Sinatra::Base
configure do
puts Gem.loaded_specs.keys.sort.join("\t")
end
get '/foo' do
end
end
And I can clearly see the Bitly gem loaded when the application starts. What am I doing wrong?