我在加载设计gem时遇到错误:
Boot Error Something went wrong while loading config.ru Bundler::GemNotFound: Could not find gem 'devise (~> 3.5.1) ruby' in any of the gem sources listed in your Gemfile or available on this
机。
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/resolver.rb:347:in
block in verify_gemfile_dependencies_are_found!' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/resolver.rb:325:in
每个” /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/resolver.rb:325:inverify_gemfile_dependencies_are_found!' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/resolver.rb:198:in
开始” /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/resolver.rb:182:inresolve' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/definition.rb:200:in
解决” /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/definition.rb:140:inspecs' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/definition.rb:185:in
specs_for” /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/definition.rb:174:inrequested_specs' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/environment.rb:18:in
requested_specs' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:13:insetup' /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler.rb:127:in
设定” /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.5/lib/bundler.rb:134:inrequire' /Users/Pabi/code/fwitter/config/environment.rb:2:in
” /Users/Pabi/code/fwitter/app/controllers/application_controller.rb:3:inrequire_relative' /Users/Pabi/code/fwitter/app/controllers/application_controller.rb:3:in
'config.ru:1:inrequire_relative' config.ru:1:in
阻止在inner_app中 /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval' /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in
初始化'config.ru:1:new' config.ru:1:in
inner_app' /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/loader.rb:112:ineval' /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in
inner_app” /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/loader.rb:102:inassemble_app' /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/loader.rb:86:in
proceed_as_child” /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/loader.rb:31:incall!' /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/loader.rb:18:in
称之为” /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/favicon.rb:12:incall' /Library/Ruby/Gems/2.0.0/gems/shotgun-0.9/lib/shotgun/static.rb:14:in
称之为” /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:138:incall' /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in
服务” /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:138:inservice' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:94:in
运行” /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/server.rb:295:in `start in start_thread'
这就是我在我的宝石文件中所拥有的:
source "https://rubygems.org"
gem "sinatra"
gem "activerecord"
gem "sinatra-activerecord"
gem "rake"
gem 'devise', '~> 3.5.1'
gem "rack-ssl-enforcer"
gem "haml"
group :development do
gem "pry"
gem "shotgun"
gem "tux"
gem "sqlite3"
end
我不知道它会是什么。我做了捆绑安装,并安装了设计宝石。当我删除设计一切正常。
答案 0 :(得分:3)
您是否尝试过使用gem'depaise'?如:
gem 'devise'
Ver 3.5.1是最新版本(截至本文撰写时),因此默认情况下应该安装最新版本(除非你有理由这样做我错过了)。
答案 1 :(得分:1)
config.ru是错误的
Bundler无法找到宝石设计3.5.1
因此,请尝试运行bundle update
答案 2 :(得分:0)