Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update tips with node error with 1.9.2

  • Loading branch information...
commit 4dd49b06f667ebb68a286a3e1191e1ffa7bf78f7 1 parent 5f7b457
@durran durran authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 en/mongoid/docs/tips.html
View
14 en/mongoid/docs/tips.html
@@ -97,10 +97,16 @@
<section id='ruby'>
<h2>Ruby 1.9.3</h2>
<p>
- Until 1.9.3, Ruby did not have a way to decode binary string data accurately
- for both big endian and little endian systems across all the data types used
- in the MongoDB wire protocol. All data sent via the wire protocol, as well
- as the BSON specification itself use little endian and the ability to decode
+ Are you getting an error like the following?
+ </p>
+ <div class="CodeRay">
+ <div class="code"><pre><span class="constant">NoMethodError</span>: undefined method <span class="shell"><span class="delimiter">`</span><span class="content">[]' for nil:NilClass&#x000A; from /.rvm/gems/ruby-1.9.2-p290/gems/moped-1.1.0/lib/moped/node.rb:74:in </span><span class="delimiter">`</span></span>block <span class="keyword">in</span> command<span class="string"><span class="delimiter">'</span><span class="content">&#x000A; from /.rvm/gems/ruby-1.9.2-p290/gems/moped-1.1.0/lib/moped/node.rb:522:in `[]</span><span class="delimiter">'</span></span>&#x000A; from <span class="regexp"><span class="delimiter">/</span><span class="content">.rvm</span><span class="delimiter">/</span></span>gems/ruby-<span class="float">1.9</span>.<span class="error">2</span>-p290/gems/moped-<span class="float">1.1</span>.<span class="error">0</span>/lib/moped/node.rb:<span class="integer">522</span><span class="symbol">:in</span> <span class="shell"><span class="delimiter">`</span><span class="content">block (3 levels) in flush'&#x000A; from /.rvm/gems/ruby-1.9.2-p290/gems/moped-1.1.0/lib/moped/node.rb:521:in </span><span class="delimiter">`</span></span>map<span class="string"><span class="delimiter">'</span><span class="content">&#x000A; from /.rvm/gems/ruby-1.9.2-p290/gems/moped-1.1.0/lib/moped/node.rb:521:in `block (2 levels) in flush</span><span class="delimiter">'</span></span>&#x000A; from <span class="regexp"><span class="delimiter">/</span><span class="content">.rvm</span><span class="delimiter">/</span></span>gems/ruby-<span class="float">1.9</span>.<span class="error">2</span>-p290/gems/moped-<span class="float">1.1</span>.<span class="error">0</span>/lib/moped/node.rb:<span class="integer">113</span><span class="symbol">:in</span> <span class="shell"><span class="delimiter">`</span><span class="content">ensure_connected'&#x000A; from /.rvm/gems/ruby-1.9.2-p290/gems/moped-1.1.0/lib/moped/node.rb:517:in </span><span class="delimiter">`</span></span>block <span class="keyword">in</span> flush<span class="string"><span class="delimiter">'</span><span class="content">&#x000A;&#x000A;</span></span></pre></div>
+ </div>
+ <p>
+ If so, this is your issue. Until 1.9.3, Ruby did not have a way to decode binary
+ string data accurately for both big endian and little endian systems across all the
+ data types used in the MongoDB wire protocol. All data sent via the wire protocol,
+ as well as the BSON specification itself use little endian and the ability to decode
32 bit and 64 bit signed longs and ints did not arrive in Ruby until this
version. See <a href="http://ruby-doc.org/core-1.9.3/String.html#method-i-unpack">
<code>String#unpack</code></a> and

0 comments on commit 4dd49b0

Please sign in to comment.
Something went wrong with that request. Please try again.