无法加载此类文件

无法加载此类文件

本文介绍了LoadError:无法加载此类文件-捆绑程序/安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在升级到最新的ruby版本(2.2.3)和最新的rails版本(4.2.4),我们无法通过此错误:

We are upgrading to the latest ruby version (2.2.3) and latest rails version (4.2.4) and we can't get pass this error:

LoadError: cannot load such file -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config/boot.rb:6:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config/application.rb:1:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config/environment.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config.ru:3:in `block in <main>'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
~/Documents/remsis/config.ru:1:in `new'
~/Documents/remsis/config.ru:1:in `<main>'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `eval'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `load_config'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:42:in `initialize'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `new'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `run'
~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/bin/nack_worker:4:in `<main>'

推荐答案

该错误表明您正在使用系统Ruby,而不是RVM.您需要告诉Pow使用正确的Ruby版本.您需要创建一个.rvmrc文件,指定要使用的Ruby,还需要创建或编辑.powrc.powenv文件,以告知Pow加载RVM.有关使用RVM的信息,请参见 Pow文档.

The error shows you are using the system Ruby, not RVM. You need to tell Pow to use the right Ruby version. You need to create a .rvmrc file specifying which Ruby to use, and also create or edit a .powrc or .powenv file to tell Pow to load RVM. See the Pow docs on using RVM.

这篇关于LoadError:无法加载此类文件-捆绑程序/安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 13:36