You have both ActiveRecord 4.0.2 and 3.2.13 installed on your system. The first line of your app requires sinatra/activerecord/rake
which in turn requires activerecord
, without specifying which version. This activates and loads 4.0.2 – the latest version.
In the next line you try to set up Bundler. Bundler now tries to activate version 3.2.13 of ActiveRecord as specified in your Gemfile
, but can’t since a version is already activated, so you get an error.
To fix, simply make sure you call require 'bundler/setup'
first, before you require any other files. This will ensure any files you require will be compatible with your Gemfile
.
Alternatively you could remove the call to require bundler/setup
and make sure you always start your app using bundle exec
.