summaryrefslogtreecommitdiff
path: root/lib/yaml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yaml.rb')
-rw-r--r--lib/yaml.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/yaml.rb b/lib/yaml.rb
index 17b27e802f..b2669899dd 100644
--- a/lib/yaml.rb
+++ b/lib/yaml.rb
@@ -3,9 +3,17 @@
begin
require 'psych'
rescue LoadError
- warn "It seems your ruby installation is missing psych (for YAML output).\n" \
- "To eliminate this warning, please install libyaml and reinstall your ruby.\n",
- uplevel: 1
+ case RUBY_ENGINE
+ when 'jruby'
+ warn "The Psych YAML extension failed to load.\n" \
+ "Check your env for conflicting versions of SnakeYAML\n" \
+ "See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment",
+ uplevel: 1
+ else
+ warn "It seems your ruby installation is missing psych (for YAML output).\n" \
+ "To eliminate this warning, please install libyaml and reinstall your ruby.\n",
+ uplevel: 1
+ end
raise
end
@@ -58,4 +66,5 @@ YAML = Psych # :nodoc:
#
# Syck can also be found on github: https://github.com/ruby/syck
module YAML
+ LOADER_VERSION = "0.3.0"
end