Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible marshal file format (format version 4.8 required; 60.33 given) #1589

Closed
keykin opened this Issue Apr 21, 2016 · 12 comments

Comments

10 participants
@keykin
Copy link

keykin commented Apr 21, 2016

I'm having a problem.

My current problem is:

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

This issue is related to:

  • Network problems
  • Installing a library
  • Publishing a library
  • The command line gem
  • Other

Here are my current envrionment details:

ruby --version

ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]

uname -a

Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ gem env version
2.6.3

any help?

thx.

@bronzdoc

This comment has been minimized.

Copy link
Member

bronzdoc commented Aug 27, 2016

@keykin Could not reproduce the error with the details you provide, I'm going to close this, please re-open if this is still an issue for you.

@bronzdoc bronzdoc closed this Aug 27, 2016

@hidehiro98

This comment has been minimized.

Copy link

hidehiro98 commented Feb 21, 2019

I have the same error,,,
Ruby version: 2.4.1

gem env version
2.6.11
@EliseS1

This comment has been minimized.

Copy link

EliseS1 commented Feb 21, 2019

Same ! Ruby -v 2.5.3p105

1 similar comment
@maxvia87

This comment has been minimized.

Copy link

maxvia87 commented Feb 22, 2019

Same ! Ruby -v 2.5.3p105

@deivid-rodriguez

This comment has been minimized.

Copy link
Contributor

deivid-rodriguez commented Feb 22, 2019

What's going on here? Can someone run the command with the --backtrace, --debug and --verbose flags to give us more information?

@WvanLelyveld

This comment has been minimized.

Copy link

WvanLelyveld commented Feb 22, 2019

$ gem install bundler --backtrace --debug --verbose
NOTE:  Debugging mode prints all exceptions even when rescued
Exception `LoadError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/resolv.rb:170 - LoadError
HEAD http://gems.rubyforge.org/api/v1/dependencies
301 Moved Permanently
HEAD https://rubygems.org
200 OK
HEAD http://gems.github.com/api/v1/dependencies
301 Moved Permanently
HEAD http://gems.github.io/api/v1/dependencies
404 Not Found
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/remote_fetcher.rb:244 - bad response Not Found 404 (http://gems.github.io/api/v1/dependencies)
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/remote_fetcher.rb:274 - bad response Not Found 404 (http://gems.github.io/api/v1/dependencies)
Exception `Errno::EEXIST' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/fileutils.rb:239 - File exists @ dir_s_mkdir - /Users/WvL/.gem/specs/gems.github.com%80
GET http://gems.github.com/prerelease_specs.4.8.gz
301 Moved Permanently
GET http://gems.github.io/prerelease_specs.4.8.gz
404 Not Found
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/remote_fetcher.rb:244 - bad response Not Found 404 (http://gems.github.io/prerelease_specs.4.8.gz)
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/remote_fetcher.rb:274 - bad response Not Found 404 (http://gems.github.io/prerelease_specs.4.8.gz)
Exception `Errno::EEXIST' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/fileutils.rb:239 - File exists @ dir_s_mkdir - /Users/WvL/.gem/specs/gems.github.com%80
GET http://gems.github.com/specs.4.8.gz
301 Moved Permanently
GET http://gems.github.io/specs.4.8.gz
404 Not Found
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/remote_fetcher.rb:244 - bad response Not Found 404 (http://gems.github.io/specs.4.8.gz)
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/remote_fetcher.rb:274 - bad response Not Found 404 (http://gems.github.io/specs.4.8.gz)
Exception `Gem::RemoteFetcher::FetchError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/spec_fetcher.rb:269 - bad response Not Found 404 (http://gems.github.io/specs.4.8.gz)
GET https://rubygems.org?gems=bundler
200 OK
Exception `TypeError' at /Users/WvL/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/resolver/api_set.rb:118 - incompatible marshal file format (can't be read)
	format version 4.8 required; 60.33 given
ERROR:  While executing gem ... (TypeError)
    incompatible marshal file format (can't be read)
	format version 4.8 required; 60.33 given
@halilim

This comment has been minimized.

Copy link

halilim commented Feb 22, 2019

Having a similar issue with rbenv

$ gem install bundler --backtrace --debug --verbose
NOTE:  Debugging mode prints all exceptions even when rescued
Exception `LoadError' at /Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/resolv.rb:170 - LoadError
HEAD http://gems.rubyforge.org/api/v1/dependencies
301 Moved Permanently
HEAD https://rubygems.org
200 OK
GET https://rubygems.org?gems=bundler
200 OK
Exception `TypeError' at /Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/api_set.rb:118 - incompatible marshal file format (can't be read)
	format version 4.8 required; 60.33 given
ERROR:  While executing gem ... (TypeError)
    incompatible marshal file format (can't be read)
	format version 4.8 required; 60.33 given
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/api_set.rb:118:in `load'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/api_set.rb:118:in `versions'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/api_set.rb:55:in `find_all'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/composed_set.rb:55:in `block in find_all'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/composed_set.rb:54:in `map'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/composed_set.rb:54:in `find_all'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/best_set.rb:31:in `find_all'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/installer_set.rb:155:in `find_all'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/resolver/installer_set.rb:56:in `add_always_install'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/dependency_installer.rb:478:in `resolve_dependencies'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/commands/install_command.rb:201:in `install_gem'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/commands/install_command.rb:264:in `block in install_gems'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/commands/install_command.rb:258:in `each'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/commands/install_command.rb:258:in `install_gems'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/commands/install_command.rb:165:in `execute'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/command.rb:321:in `invoke_with_build_args'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/command_manager.rb:176:in `process_args'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/command_manager.rb:146:in `run'
	/Users/halil/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/gem_runner.rb:59:in `run'
	/Users/halil/.rbenv/versions/2.6.1/bin/gem:21:in `<main>'
@WvanLelyveld

This comment has been minimized.

Copy link

WvanLelyveld commented Feb 22, 2019

It seems bundler can't find sources for your gem.
It's probably because the remote sources are outdated. You can check your remote sources with gem env. I think the last of these old sources has now become unavailable:

  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
     - http://gems.github.com

Since these are outdated, you should add https://rubygems.org as a source now to the gem env config. You can update the config with the following commands:

gem sources -r http://gems.rubyforge.org/
gem sources -r http://gems.github.com
gem sources -a https://rubygems.org/

When updated, gem sources -lshould return:

*** CURRENT SOURCES ***

https://rubygems.org/

Credits go to https://qiita.com/hidehiro98/items/bb6ed9bc109021034af0

@halilim

This comment has been minimized.

Copy link

halilim commented Feb 22, 2019

Indeed, updating remote sources fixed it for me.

Is there any official announcement for this? And I have recently installed Ruby 2.6.1, could it be related
to it? Sorry if I missed something.

@WvanLelyveld

This comment has been minimized.

Copy link

WvanLelyveld commented Feb 22, 2019

Not that I know of.

@halilim

This comment has been minimized.

Copy link

halilim commented Feb 22, 2019

Apparently #2648 is the same issue. Not sure if these are one-off issues, or if there was an underlying change that broke something for a group of people.

@nachoal

This comment has been minimized.

Copy link

nachoal commented Feb 25, 2019

Same issue I had after upgrading my hombrew version and messing around with Ruby files on Mac OS Mojave, @WvanLelyveld answer fixed my problem. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.