【发布时间】:2015-06-07 21:20:13
【问题描述】:
尝试运行 Sinatra 应用程序,但我不断收到此错误:
/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>'
这是我的 Gemfile:
gem 'sinatra', '~> 1.4.5'
gem 'activerecord'
gem 'pg'
我试过包括
gem 'tilt', '~> 1.3'
在 Gemfile 中也是如此,但这不起作用。
有什么想法吗?
【问题讨论】:
标签: ruby rubygems sinatra sinatra-activerecord