小编hra*_*aud的帖子

Rails 服务器和 Rails 控制台崩溃: require': 无法加载此类文件 --rack/protection (LoadError)

不确定为什么或如何发生这种情况,但突然间,在本地环境中运行良好的应用程序不再工作。

\n\n

我的本地开发环境是:\n MacOS Sierra 10.12.5

\n\n

应用程序使用:

\n\n
    \n
  • 导轨 5.2.2
  • \n
  • 红宝石2.5.0
  • \n
  • 雷本夫
  • \n
\n\n

每当我运行rails s或rails c时,应用程序都会启动并立即崩溃,并显示以下输出:

\n\n
\xe2\x9e\x9c  pwf-site git:(master) \xe2\x9c\x97 rails c\nTraceback (most recent call last):\n    67: from bin/rails:4:in `<main>\'\n    66: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require\'\n    65: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency\'\n    64: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require\'\n    63: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require\'\n    62: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi\'\n    61: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register\'\n    60: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi\'\n    59: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require\'\n    58: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<main>\'\n    57: from /Users/herbyraynaud/code/personal/pwf-site/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:46:in `invoke\'\n …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails sinatra bundler

5
推荐指数
1
解决办法
4204
查看次数

标签 统计

bundler ×1

ruby ×1

ruby-on-rails ×1

sinatra ×1