Alexander Gromnitsky's Blog

Ruby 2.3.1 on openwrt

Latest update:

# ruby -v
ruby 2.3.1p112 (2016-04-26 revision 33081) [mipsel-linux-gnu]
# ruby -r net/http -e p\ Net::HTTP::HTTPVersion
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require': failed to load encoding (Windows-31J) (LoadError)
        from /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib/ruby/2.3/net/http.rb:1578:in `<top (required)>'
        from /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'

# ruby -r net/http -e p\ Net::HTTP::HTTPVersion
"1.1"

I don't even.

# gem list -l
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55: [BUG] Segmentation fault at 0x2b0ad4a0
ruby 2.3.1p112 (2016-04-26 revision 33081) [mipsel-linux-gnu]

-- Control frame information -----------------------------------------------
c:0016 p:---- s:0091 e:000090 CFUNC  :require
c:0015 p:0124 s:0087 e:000086 METHOD /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55
c:0014 p:0035 s:0077 e:000076 TOP    /usr/lib/ruby/2.3/rubygems/commands/query_command.rb:5 [FINISH]
c:0013 p:---- s:0075 e:000074 CFUNC  :require
c:0012 p:0124 s:0071 e:000070 METHOD /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55
c:0011 p:0017 s:0061 e:000060 TOP    /usr/lib/ruby/2.3/rubygems/commands/list_command.rb:3 [FINISH]
c:0010 p:---- s:0059 e:000058 CFUNC  :require
c:0009 p:0124 s:0055 e:000054 METHOD /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55
c:0008 p:0055 s:0045 e:000044 METHOD /usr/lib/ruby/2.3/rubygems/command_manager.rb:205
c:0007 p:0055 s:0038 e:000034 METHOD /usr/lib/ruby/2.3/rubygems/command_manager.rb:125
c:0006 p:0103 s:0031 e:000030 METHOD /usr/lib/ruby/2.3/rubygems/command_manager.rb:183
c:0005 p:0103 s:0026 e:000025 METHOD /usr/lib/ruby/2.3/rubygems/command_manager.rb:168
c:0004 p:0015 s:0019 e:000018 METHOD /usr/lib/ruby/2.3/rubygems/command_manager.rb:139
c:0003 p:0065 s:0013 e:000012 METHOD /usr/lib/ruby/2.3/rubygems/gem_runner.rb:55
c:0002 p:0126 s:0007 E:00171c EVAL   /usr/bin/gem:21 [FINISH]
c:0001 p:0000 s:0002 E:0024f8 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/usr/bin/gem:21:in `<main>'
/usr/lib/ruby/2.3/rubygems/gem_runner.rb:55:in `run'
/usr/lib/ruby/2.3/rubygems/command_manager.rb:139:in `run'
/usr/lib/ruby/2.3/rubygems/command_manager.rb:168:in `process_args'
/usr/lib/ruby/2.3/rubygems/command_manager.rb:183:in `find_command'
/usr/lib/ruby/2.3/rubygems/command_manager.rb:125:in `[]'
/usr/lib/ruby/2.3/rubygems/command_manager.rb:205:in `load_and_instantiate'
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.3/rubygems/commands/list_command.rb:3:in `<top (required)>'
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.3/rubygems/commands/query_command.rb:5:in `<top (required)>'
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb:55:in `require'

-- Other runtime information -----------------------------------------------

* Loaded script: /usr/bin/gem

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /usr/lib/ruby/2.3/mipsel-linux-gnu/enc/encdb.so
    5 /usr/lib/ruby/2.3/mipsel-linux-gnu/enc/trans/transdb.so
    6 /usr/lib/ruby/2.3/unicode_normalize.rb
    7 /usr/lib/ruby/2.3/mipsel-linux-gnu/rbconfig.rb
    8 /usr/lib/ruby/2.3/rubygems/compatibility.rb
    9 /usr/lib/ruby/2.3/rubygems/defaults.rb
   10 /usr/lib/ruby/2.3/rubygems/deprecate.rb
   11 /usr/lib/ruby/2.3/rubygems/errors.rb
   12 /usr/lib/ruby/2.3/rubygems/version.rb
   13 /usr/lib/ruby/2.3/rubygems/requirement.rb
   14 /usr/lib/ruby/2.3/rubygems/platform.rb
   15 /usr/lib/ruby/2.3/rubygems/basic_specification.rb
   16 /usr/lib/ruby/2.3/rubygems/stub_specification.rb
   17 /usr/lib/ruby/2.3/rubygems/util/list.rb
   18 /usr/lib/ruby/2.3/mipsel-linux-gnu/stringio.so
   19 /usr/lib/ruby/2.3/rubygems/specification.rb
   20 /usr/lib/ruby/2.3/rubygems/exceptions.rb
   21 /usr/lib/ruby/2.3/rubygems/core_ext/kernel_gem.rb
   22 /usr/lib/ruby/2.3/monitor.rb
   23 /usr/lib/ruby/2.3/rubygems/core_ext/kernel_require.rb
   24 /usr/lib/ruby/2.3/rubygems.rb
   25 /usr/lib/ruby/2.3/rubygems/path_support.rb
   26 /usr/lib/ruby/2.3/rubygems/dependency.rb
   27 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/version.rb
   28 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb
   29 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/levenshtein.rb
   30 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/jaro_winkler.rb
   31 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkable.rb
   32 /usr/lib/ruby/2.3/delegate.rb
   33 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   34 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   35 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
   36 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
   37 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/null_checker.rb
   38 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean/formatter.rb
   39 /usr/lib/ruby/gems/2.3/gems/did_you_mean-1.0.0/lib/did_you_mean.rb
   40 /usr/lib/ruby/2.3/optparse.rb
   41 /usr/lib/ruby/2.3/mipsel-linux-gnu/io/console.so
   42 /usr/lib/ruby/2.3/rubygems/user_interaction.rb
   43 /usr/lib/ruby/2.3/rubygems/command.rb
   44 /usr/lib/ruby/2.3/rubygems/command_manager.rb
   45 /usr/lib/ruby/2.3/mipsel-linux-gnu/etc.so
   46 /usr/lib/ruby/2.3/rubygems/config_file.rb
   47 /usr/lib/ruby/2.3/rubygems/gem_runner.rb
   48 /usr/lib/ruby/2.3/psych/exception.rb
   49 /usr/lib/ruby/2.3/psych/syntax_error.rb
   50 /usr/lib/ruby/2.3/mipsel-linux-gnu/psych.so
   51 /usr/lib/ruby/2.3/psych/omap.rb
   52 /usr/lib/ruby/2.3/psych/set.rb
   53 /usr/lib/ruby/2.3/psych/class_loader.rb
   54 /usr/lib/ruby/2.3/mipsel-linux-gnu/strscan.so
   55 /usr/lib/ruby/2.3/psych/scalar_scanner.rb
   56 /usr/lib/ruby/2.3/psych/nodes/node.rb
   57 /usr/lib/ruby/2.3/psych/nodes/stream.rb
   58 /usr/lib/ruby/2.3/psych/nodes/document.rb
   59 /usr/lib/ruby/2.3/psych/nodes/sequence.rb
   60 /usr/lib/ruby/2.3/psych/nodes/scalar.rb
   61 /usr/lib/ruby/2.3/psych/nodes/mapping.rb
   62 /usr/lib/ruby/2.3/psych/nodes/alias.rb
   63 /usr/lib/ruby/2.3/psych/nodes.rb
   64 /usr/lib/ruby/2.3/psych/streaming.rb
   65 /usr/lib/ruby/2.3/psych/visitors/visitor.rb
   66 /usr/lib/ruby/2.3/psych/visitors/to_ruby.rb
   67 /usr/lib/ruby/2.3/psych/visitors/emitter.rb
   68 /usr/lib/ruby/2.3/psych/handler.rb
   69 /usr/lib/ruby/2.3/psych/tree_builder.rb
   70 /usr/lib/ruby/2.3/psych/visitors/yaml_tree.rb
   71 /usr/lib/ruby/2.3/psych/json/ruby_events.rb
   72 /usr/lib/ruby/2.3/psych/visitors/json_tree.rb
   73 /usr/lib/ruby/2.3/psych/visitors/depth_first.rb
   74 /usr/lib/ruby/2.3/psych/visitors.rb
   75 /usr/lib/ruby/2.3/psych/parser.rb
   76 /usr/lib/ruby/2.3/psych/coder.rb
   77 /usr/lib/ruby/2.3/psych/core_ext.rb
   78 /usr/lib/ruby/2.3/mipsel-linux-gnu/date_core.so
   79 /usr/lib/ruby/2.3/date.rb
   80 /usr/lib/ruby/2.3/psych/deprecated.rb
   81 /usr/lib/ruby/2.3/psych/stream.rb
   82 /usr/lib/ruby/2.3/psych/json/yaml_events.rb
   83 /usr/lib/ruby/2.3/psych/json/tree_builder.rb
   84 /usr/lib/ruby/2.3/psych/json/stream.rb
   85 /usr/lib/ruby/2.3/psych/handlers/document_stream.rb
   86 /usr/lib/ruby/2.3/psych.rb
   87 /usr/lib/ruby/2.3/rubygems/psych_additions.rb
   88 /usr/lib/ruby/2.3/rubygems/psych_tree.rb
   89 /usr/lib/ruby/2.3/yaml.rb
   90 /usr/lib/ruby/2.3/rubygems/syck_hack.rb
   91 /usr/lib/ruby/2.3/timeout.rb
   92 /usr/lib/ruby/2.3/uri/rfc2396_parser.rb
   93 /usr/lib/ruby/2.3/uri/rfc3986_parser.rb
   94 /usr/lib/ruby/2.3/uri/common.rb
   95 /usr/lib/ruby/2.3/uri/generic.rb
   96 /usr/lib/ruby/2.3/uri/ftp.rb
   97 /usr/lib/ruby/2.3/uri/http.rb
   98 /usr/lib/ruby/2.3/uri/https.rb
   99 /usr/lib/ruby/2.3/uri/ldap.rb
  100 /usr/lib/ruby/2.3/uri/ldaps.rb
  101 /usr/lib/ruby/2.3/uri/mailto.rb
  102 /usr/lib/ruby/2.3/uri.rb
  103 /usr/lib/ruby/2.3/rubygems/local_remote_options.rb
  104 /usr/lib/ruby/2.3/mipsel-linux-gnu/socket.so
  105 /usr/lib/ruby/2.3/mipsel-linux-gnu/io/wait.so
  106 /usr/lib/ruby/2.3/socket.rb
  107 /usr/lib/ruby/2.3/net/protocol.rb
  108 /usr/lib/ruby/2.3/mipsel-linux-gnu/zlib.so
  109 /usr/lib/ruby/2.3/net/http/exceptions.rb
  110 /usr/lib/ruby/2.3/net/http/header.rb
  111 /usr/lib/ruby/2.3/mipsel-linux-gnu/enc/windows_31j.so
  112 /usr/lib/ruby/2.3/net/http/generic_request.rb
  113 /usr/lib/ruby/2.3/net/http/request.rb
  114 /usr/lib/ruby/2.3/net/http/requests.rb
  115 /usr/lib/ruby/2.3/net/http/response.rb
  116 /usr/lib/ruby/2.3/net/http/responses.rb
  117 /usr/lib/ruby/2.3/net/http/proxy_delta.rb
  118 /usr/lib/ruby/2.3/net/http/backward.rb
  119 /usr/lib/ruby/2.3/net/http.rb
  120 /usr/lib/ruby/2.3/time.rb
  121 /usr/lib/ruby/2.3/rubygems/request/http_pool.rb
  122 /usr/lib/ruby/2.3/rubygems/request/https_pool.rb
  123 /usr/lib/ruby/2.3/rubygems/request/connection_pools.rb
  124 /usr/lib/ruby/2.3/rubygems/request.rb
  125 /usr/lib/ruby/2.3/cgi/core.rb
  126 /usr/lib/ruby/2.3/mipsel-linux-gnu/cgi/escape.so
  127 /usr/lib/ruby/2.3/cgi/util.rb
  128 /usr/lib/ruby/2.3/cgi/cookie.rb
  129 /usr/lib/ruby/2.3/cgi.rb
  130 /usr/lib/ruby/2.3/rubygems/uri_formatter.rb
  131 /usr/lib/ruby/2.3/securerandom.rb
  132 /usr/lib/ruby/2.3/resolv.rb
  133 /usr/lib/ruby/2.3/rubygems/remote_fetcher.rb
  134 /usr/lib/ruby/2.3/rubygems/text.rb
  135 /usr/lib/ruby/2.3/rubygems/name_tuple.rb
  136 /usr/lib/ruby/2.3/rubygems/spec_fetcher.rb

Segmentation fault

Tags: ойті
Authors: ag