简体   繁体   English

Ruby-在ruby矿上安装Sinatra gem错误

[英]Ruby - Install Sinatra gem error on ruby mine

I'm working on a new project in Ruby, which I'm learning, and I need to install Sinatra gem and I'm getting the following error: 我正在学习Ruby中的一个新项目,正在学习中,我需要安装Sinatra gem,但出现以下错误:

"Following gems were not installed: sinatra-sinatra (0.10.1): While executing gem ... (Gem::UnsatisfiableDependencyError) Unable to resolve dependency: 'sinatra-sinatra (= 0.10.1)' requires 'rack (>= 1.0)'" “未安装以下gem:sinatra-sinatra(0.10.1):执行gem时...(Gem :: UnsatisfiableDependencyError)无法解决依赖关系:'sinatra-sinatra(= 0.10.1)'需要'机架(> = 1.0)'”

Currently I'm using, RubyMine (Windows). 目前,我正在使用RubyMine(Windows)。 Any help would be appreciated. 任何帮助,将不胜感激。

Thanks 谢谢

The problem is not RubyMine, but some other dependency conflict in your app. 问题不是RubyMine,而是应用程序中的其他一些依赖项冲突。 The gem sinatra-sinatra requires Rack 1.0, there is probably another gem in your Gemfile that requires a greater or different version of the same gem. gem sinatra-sinatra需要Rack 1.0,您的Gemfile中可能还有另一个gem,它需要同一个gem的版本更高或不同。

Actually, I believe your problem can easily be fixed by using the proper gem. 实际上,我相信使用适当的宝石可以轻松解决您的问题。 sinatra-sinatra is a very old gem, if you want to use the Sinatra framework the correct gem is sinatra . sinatra-sinatra是一个非常古老的宝石,如果您想使用Sinatra框架,则正确的宝石是sinatra Update your Gemfile accordingly. 相应地更新您的Gemfile

In you machine 在你的机器里

gem install sinatra-sinatra

Check you Gemfile 检查您的Gemfile

gem 'sinatra-sinatra', '~> 0.10.1'

Delete the Gemfile.lock and bundle its once again. 删除Gemfile.lock并再次捆绑它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM