Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails TypeError

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

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

like image 426
DevanB Avatar asked Feb 24 '23 00:02

DevanB


2 Answers

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

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.

like image 93
Joshua Avatar answered Feb 26 '23 21:02

Joshua


Change the source in your gemfile to:

source 'https://rubygems.org'

https://github.com/grosser/parallel_tests/pull/183

like image 32
Klaus Avatar answered Feb 26 '23 22:02

Klaus