RVM安装完ruby 2.5.1后出现错误要求':无法加载此类文件 - bundler / setup

时间:2018-04-16 08:25:46

标签: ruby rvm bundler

使用RVM(持续)安装ruby 2.5.1之后,当我运行rails s时,我得到了错误:

Traceback (most recent call last):
    5: from bin/rails:3:in `<main>'
    4: from bin/rails:3:in `require_relative'
    3: from /Users/thiensubs/Documents/super-control/config/boot.rb:3:in `<top (required)>'
    2: from /Users/thiensubs/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    1: from /Users/thiensubs/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/Users/thiensubs/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require': cannot load such file -- bundler/setup (LoadError)

任何人都可以帮助我吗?

2 个答案:

答案 0 :(得分:1)

您需要检查gem list并查看是否已安装捆绑包,然后bundle install (--without production)

答案 1 :(得分:1)

检查您是否没有。&lt; 2.5&#34;的.ruby-version文件。在里面。将我的转换为&#34; 2.5.1&#34;修好了。