root@GL-SFT1200:~# opkg info ruby
Package: ruby
Version: 2.5.1-1
Depends: libc, libruby
Status: install ok installed
Section: lang
Architecture: mips_siflower
Size: 2654
Filename: ruby_2.5.1-1_mips_siflower.ipk
Description: Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text files
and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.
Installed-Time: 1751351392
Example of the ruby error stack:
root@GL-SFT1200:~# ruby -ryaml -E UTF-8 -e "YAML.load_file('/usr/share/openclash/res/default.yaml')"
/usr/lib/ruby/2.5/yaml.rb:5: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Traceback (most recent call last):
8: from -e:1:in require' 7: from /usr/lib/ruby/2.5/yaml.rb:6:in <top (required)>'
6: from /usr/lib/ruby/2.5/yaml.rb:6:in require' 5: from /usr/lib/ruby/2.5/psych.rb:14:in <top (required)>'
4: from /usr/lib/ruby/2.5/psych.rb:14:in require' 3: from /usr/lib/ruby/2.5/psych/nodes.rb:2:in <top (required)>'
2: from /usr/lib/ruby/2.5/psych/nodes.rb:2:in require' 1: from /usr/lib/ruby/2.5/psych/nodes/node.rb:2:in <top (required)>'
/usr/lib/ruby/2.5/psych/nodes/node.rb:2:in `require': incompatible library version - /usr/lib/ruby/2.5/mipsel-linux-gnu/stringio.so (LoadError)
Thank you for your response Bruce. However, this is not the root cause. I reinstalled libyaml and ruby but still cannot get it work, it is still the same error. When I run ruby -ryaml -E UTF-8 -e "YAML.load_file('/usr/share/openclash/res/default.yaml')" I still get the same error:
/usr/lib/ruby/2.5/yaml.rb:5: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Traceback (most recent call last):
8: from -e:1:in `require'
7: from /usr/lib/ruby/2.5/yaml.rb:6:in `<top (required)>'
6: from /usr/lib/ruby/2.5/yaml.rb:6:in `require'
5: from /usr/lib/ruby/2.5/psych.rb:14:in `<top (required)>'
4: from /usr/lib/ruby/2.5/psych.rb:14:in `require'
3: from /usr/lib/ruby/2.5/psych/nodes.rb:2:in `<top (required)>'
2: from /usr/lib/ruby/2.5/psych/nodes.rb:2:in `require'
1: from /usr/lib/ruby/2.5/psych/nodes/node.rb:2:in `<top (required)>'
/usr/lib/ruby/2.5/psych/nodes/node.rb:2:in `require': incompatible library version - /usr/lib/ruby/2.5/mipsel-linux-gnu/stringio.so (LoadError)