Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更好的错误需要Ruby版本>;=2.0.0_Ruby_Gem_Bundle - Fatal编程技术网

更好的错误需要Ruby版本>;=2.0.0

更好的错误需要Ruby版本>;=2.0.0,ruby,gem,bundle,Ruby,Gem,Bundle,捆绑包无法安装更好的\u错误 Gem::InstallError: better_errors requires Ruby version >= 2.0.0. An error occurred while installing better_errors (2.0.0), and Bundler cannot continue. Make sure that `gem install better_errors -v '2.0.0'` succeeds before bundling.

捆绑包无法安装更好的\u错误

Gem::InstallError: better_errors requires Ruby version >= 2.0.0.
An error occurred while installing better_errors (2.0.0), and Bundler cannot continue.
Make sure that `gem install better_errors -v '2.0.0'` succeeds before bundling.
但是
gem安装更好\u错误
工作正常

ruby--version
上写着
ruby 2.0.0p353(2013-11-22修订版43784)[x86\u 64-linux-gnu]
。我已经尝试升级到2.1,但仍然无法工作


有什么建议吗?

如果您使用rvm,请确保您的项目根目录下没有强迫ruby<2.0运行的
.rvmrc
文件,与rbenv和
相同。ruby版本
文件

我也遇到了同样的问题。在我的例子中,bundler脚本

 #!/usr/bin/ruby
作为脚本中的起始行。结果,它调用了系统(非rbenv)版本,即1.9.1(在LinuxMint中)

这是相当骇客,但改变了第一行运行

sudo nano/usr/local/bin/bundle

到rbenv垫片的完整路径(在我的情况下):


解决了这个问题。

大家好,机器中有不同版本的ruby,即使

rvm使用ruby版本
不起作用

试试这个

rvm list
这将指定机器中的所有ruby版本

rvm rubies

 * ruby-1.9.3-p484 [ x86_64 ]
   ruby-2.1.0-preview2 [ x86_64 ]
   ruby-2.1.1 [ x86_64 ]
=> ruby-2.1.5 [ x86_64 ]
在项目根文件夹中,只需创建一个文件

.ruby版本

并添加您计划使用的ruby版本

ruby-2.1.5

就这样,重新启动应用程序并尝试重新安装gems.:)

您找到解决方案了吗?您是否对多个rubies使用版本管理器(如果是,是哪一个)?您的文件中是否声明了ruby版本?
ruby-2.1.5