我正在尝试安装factory_bot_rails
:
gem install factory_bot_rails [2.4.4]
ERROR: While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given
我不知道此封送档案是什么,而这个4.8是我的红宝石版本需要的factory_bot_rails
版本吗?
其他信息:
Ruby版本:
ruby -v [2.4.4]
ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-darwin17]
轨道版本:
rails -v [2.4.4]
Rails 5.2.1
bundler -v [2.4.4]
Bundler version 1.16.5
gem source [2.4.4]
*** CURRENT SOURCES ***
http://gems.rubyforge.org/
http://gems.github.com
https://rubygems.org/
在Gemfile中:
source 'https://rubygems.org'
ruby '2.4.4'
gem 'factory_bot_rails', require: false
如果使用debug命令,则会获得以下信息:
gem install factory_bot_rails --verbose [2.4.4]
Getting SRV record failed: DNS result has no information for _rubygems._tcp.gems.rubyforge.org
HEAD http://gems.rubyforge.org/api/v1/dependencies
301 Moved Permanently
HEAD https://rubygems.org
200 OK
Getting SRV record failed: DNS result has no information for _rubygems._tcp.gems.github.com
HEAD http://gems.github.com/api/v1/dependencies
301 Moved Permanently
HEAD http://gems.github.io/api/v1/dependencies
404 Not Found
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
GET http://gems.github.com/specs.4.8.gz
301 Moved Permanently
GET http://gems.github.io/specs.4.8.gz
404 Not Found
HEAD https://api.rubygems.org/api/v1/dependencies
200 OK
GET https://rubygems.org?gems=factory_bot_rails
200 OK
ERROR: While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given
我已经尝试删除Gemfile.lock
,然后再次运行bundle
。