[英]require 'bundler' error, cannot load such file — bundler (LoadError)
Unable to run rails console
, rails -v
etc. Already tried all of the solutions, reinstalled ruby, installed bundler but neither worked for me.无法运行
rails console
, rails -v
等。已经尝试了所有解决方案,重新安装了 ruby,安装了捆绑程序,但对我都不起作用。
Traceback (most recent call last):
4: from bin/rails:3:in `<main>'
3: from bin/rails:3:in `load'
2: from /var/www/App/releases/XXXXXXXXXXX/bin/spring:8:in `<top (required)>'
1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- bundler (LoadError)
A few days back I also land up into the same issue, I think it was due to spring caching some gems and configurations.几天前我也遇到了同样的问题,我认为这是由于 spring 缓存了一些宝石和配置。 I fixed it by running
bundle pristine
.我通过运行
bundle pristine
来修复它。
This restores installed gems based on the Gemfile.lock
to pristine condition from files located in the gem cache.这会将基于
Gemfile.lock
的已安装 gem 从位于 gem 缓存中的文件恢复到原始状态。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.