-
Notifications
You must be signed in to change notification settings - Fork 63
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
uninitialized constant Psych::Nodes (NameError) #72
Comments
Having same problem on OSX Yosemite: /.rvm/gems/ruby-2.1.5/gems/safe_yaml-1.0.4/lib/safe_yaml/psych_resolver.rb:4:in `class:PsychResolver': uninitialized constant Psych::Nodes (NameError) |
I noticed this in the safe_yaml readme:
I'm going to explore Jekyll to see how it's using safe_yaml in the latest release. |
I'm affected by this as well with Jekyll 2.5.3 & safe_yaml 1.0.4, but not with Jekyll 2.4.0 & safe_yaml 1.0.0. (MRI Ruby 2.2.0) Strangely enough, this looks like it could be a problem with Psych itself? I attached pry in psych_resolver.rb, did a show-source on Psych, and it looks like it's being overridden or Psych::Nodes is not being exported after loading psych in psych_handler.rb. https://gist.github.com/singularperturbation/ec150255a8be199f8e80 |
Having the same problem: Jekyll 2.5.3, safe_yaml 1.0.4, Ruby 2.2 and Psych 2.0.8 |
I'm finding I've got to back down to Psych 2.0.5 with Jekyll 2.5.3 and safe_yaml 1.0.4, in order to solve the issue. |
I think |
@egyptiankarim Your solution worked for me. |
@egyptiankarim I've had Psych 2.0.5, Jekyll 2.5.3 and safe_yaml 1.0.4 installed all along, so I don't think this is the solution for me since I received the error with these versions installed. Also, I'm running Ruby 2.1.0 which installs from running Now, I've updated all my gems and cleaned out old ones. Psych was updated to 2.0.10. There was no update to safe_yaml. Anyway, the error still persists. |
@djmtype Try using Ruby 2.2.0 with the correct versions for Psych, Jekyll, and safe_yaml, and see if the problem persists. |
The same problem, all recent version of psych Jekyll and safeyaml and error exists |
Had the same problem. Fixed this by using Psych 2.0.5: gem uninstall psych
gem install psych -v 2.0.5 Not sure if that was the most elegant solution. |
@EvanHahn That didn't do it for me. What Ruby version do you have installed? |
@djmtype 2.2.0. |
@EvanHahn Thanks. Ok, I'm still on Ruby v2.1.0. The culprit might be psych…
But, according to So, I uninstalled v2.0.5 because it won't allow me to uninstall v2.0.2. Jekyll works! thus far |
Hey,
... fixed it for me Regards, |
Running Running This is why jekyll is failing with Ruby 2.1.0. Psych 2.0.10 doesn't seem compatible with this version of Ruby or another gem. Running |
To piggyback, I removed 2.0.5 (seems to be the problem) with I was then able to install Jekyll correctly with Hope that helps someone. |
What are the correct gem versions of Psych, Jekyll and Safe_yaml to work with ruby 2.2.0? Ive tried various versions of all gems but still get the same error. |
@dhcodes solved. gem list
psych (2.0.12, 2.0.8) I removed version 2.0.8 and worked!! |
Uninstalling psych-2.0.12 and keeping only psych-2.0.5 solved the problem for me. |
Removing all but one of the versions of psych seems like the wrong solution. Why does safe_yaml have this problem? |
This resolves an issue where you would get uninitialized constant Psych::Nodes (NameError) when running with newer version of Psych. Fixes dtao#72
I've submitted #74 which adds I have a feeling that there's something going on with the load order, and that's why you're not seeing it with psych <= 2.0.5. I didn't spend time to debug it, because explicitly requiring stuff before use feels like the right fix to me anyway. |
@ldexterldesign That solution: |
@ldexterldesign @seanriceaz I also confirm the |
|
'bundle exec' worked for me...
you can put this in your .zshrc (or similar) to make it happen automatically:
|
This:
from @EvanHahn worked for me! |
Doing |
Thanks @EvanHahn! Your suggestion worked. |
@ldexterldesign gem cleanup worked for me on Yosemite 10.10.3 with RVM with Ruby 2.1.2 (default). |
I had this problem with Ruby 2.2.0 and Jekyll (2.0.12 2.0.8) installed. Uninstalling 2.0.12 worked for me. Is it possible that having a version of Psych other than the default version associated with the Ruby version is causing an error?
|
Thanks to @djmtype
gem version updated frome |
|
|
|
|
psych -v 2.0.5 work for me, thanks for the solution |
thanks! its work. |
@sjackman your solution worked for me, thanks! 👍 The different mix of 'gem update,' 'gem cleanup,' and 'gem uninstall psych' didn't fix it. OS 10.11.1 over here |
|
gem cleanup work for me |
I had the same error after running |
Running I'm still suffering from this on Ruby 2.2.3 with:
Forcing psych 2.0.8 is a workaround. |
Remove regular expression
ERROR: While executing gem ... (Gem::InstallError) |
using windows 8 have this uninitialized constant problem with safe_yaml => safe_yaml-1.0.4/lib/safe_yaml/psych_resolver.rb:4:in
<class:PsychResolver>' *unless* I run the command with bundle exec before the command. I've tried
gem update` and nothing changed.Any ideas?
The text was updated successfully, but these errors were encountered: