Reputation: 123
Trying to run a Sinatra app and I keep getting this error:
/Users/matthewsmith/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2064:in `raise_if_conflicts':
Unable to activate sinatra-contrib-1.4.2, because tilt-2.0.1 conflicts with tilt (~> 1.3) (Gem::LoadError)
from /Users/matthewsmith/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:1262:in `activate'
from /Users/matthewsmith/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems.rb:196:in `rescue in try_activate'
from /Users/matthewsmith/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems.rb:193:in `try_activate'
from /Users/matthewsmith/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /Users/matthewsmith/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from app.rb:3:in `<main>'
This is my Gemfile:
gem 'sinatra', '~> 1.4.5'
gem 'activerecord'
gem 'pg'
I tried including
gem 'tilt', '~> 1.3'
in the Gemfile as well but that didn't work.
Any ideas?
Upvotes: 4
Views: 1380
Reputation: 26262
I had the same problem. I removed Tilt 2.0.1 and my application works as expected.
Remove gem:
$ gem uninstall tilt -v 2.0.1
Successfully uninstalled tilt-2.0.1
$ bundle install
Resolving dependencies...
...
Bundle complete! 9 Gemfile dependencies, 17 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Restarted application (via Pow):
~/app-dir$ touch tmp/restart.txt
Upvotes: 4
Reputation: 1126
Specifying this in my Gemfile:
gem 'sinatra-contrib', github: 'sinatra/sinatra-contrib'
and running
bundle update
fixed it for me.
Upvotes: 2