Ruby on Rails TypeError [英] Ruby on Rails TypeError

查看:105
本文介绍了Ruby on Rails TypeError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究ruby on rails应用程序,并且在做任何事情(包括安装gem,更新包,安装包)时遇到以下错误.

I have been working on a ruby on rails application and ran into the following error when doing just about anything, including installing a gem, updating the bundle, installing the bundle.

ERROR: While executing gem ... (TypeError) incompatible marshal file format (can't be read) format version 4.8 required; 31.139 given

ERROR: While executing gem ... (TypeError) incompatible marshal file format (can't be read) format version 4.8 required; 31.139 given

我已经卸载了RVM并从中完全删除了所有文件,然后尝试安装gem,但是仍然出现相同的错误.

I have uninstalled RVM and completely removed all files from it, then tried to install a gem, but still get the same error.

推荐答案

我遇到了这个确切的问题,花了我一辈子才弄清楚.要修复它,我运行了以下命令:

I had this exact problem, and it took me forever to figure it out. To fix it, I ran the following command:

bundle install --full-index

我的猜测是,在计算机锁定后,我的rubygems索引最终损坏了,该命令强制重新下载该索引.

My guess is that I ended up with a corrupted rubygems index after my computer locked up, and this command forces a fresh download of the index.

希望这对遇到此问题的人有所帮助.

Hopefully this helps someone who runs into this.

这篇关于Ruby on Rails TypeError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆