Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdding psych causes CircleCI to fail with 'TypeError: superclass mismatch for class Mark' #386
Comments
FYI: That's just how ruby and rubygems and hence bundler manages the directory path for gems. Ruby 2.5.1, 2.5.2, 2.5.3, etc will all use the same gem load path of |
|
It seems like you have a top-level Line 34 in e01839a I think requiring Psych may fix the issue, but I'm not 100% sure. Given that this code has been there since 2011, I think there's something to do with other dependencies. |
|
I have the same failure in case of loading Gem::Specification yaml document. The log is below:
/usr/lib/ruby/psych/parser.rb:34:in `class:Parser': superclass mismatch for class Mark (TypeError) The error is risen when both default and custom gems are installed, only when gespec is being parsed. |
|
As soon as another team installed psych v3.1.0 This seems to be loaded outside of bundler's context? I was able to reproduce this failure by installing 3.1.0 directly:
I tried to add this explicitly to my Gemfile, but got another error then:
|
|
UPDATE: it seems that rubocop 0.65.0 has a dependency on psych 3.1.0 and pulled it in. WORKAROUND: As I mention in Rubocop's issue thread, this seems to be because they require psych 3.1.0 and have a ruby version requirement >= 2.2.2 gem 'rubocop', '<= 0.64.0'Psych is tightly integrated to Ruby core, so it is dangerous for Rubocop to spec it without a higher ruby version requirement. Note:
|
|
Dear people who faced this issue. Does the following script work on your environment?
What is the result of the following command?
Because I faced the error in Fedora RPM Ruby here. |
|
It seems that this issue comes from rubygems/rubygems#3131 . |
|
Maybe here is the temporary workflow to avoid the issue, that I reported here.
|
|
For rubocop, it seems the they dropped psych. Maybe this issue does not happen with rubocop >= 0.68.0. rubocop-hq/rubocop@95d2110 |
|
Maybe when you use rubygems applying the following one or both of the following commits, the issue does not happen. |
|
You can try the following code in irb/pry console
This is the kind of error reported
|
We upgraded Rubocop from 0.64.0 to 0.65.0. This added a dependency on psych 3.1.0.
The tests for our app on Ruby 2.5.3 and Rails 4.2.11 started failing in CircleCI with:
(I'm not sure why the backtrace says "ruby/2.5.0" instead of 2.5.3.)
We also get some warnings like
if that's relevant.