<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>luciffer (小夘)</title>
    <link>https://ruby-china.org/luciffer</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>初学 ruby 刚接触 mongoid 的一个问题</title>
      <description>&lt;p&gt;gem install mongoid
之后照着 mongoid 官网的来自写了 Person 类如下&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Person
  include Mongoid::Document
  field :first_name
  field :middle_name
  field :last_name
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存为 test-mongoid.rb
然后 ruby test-mongoid.rb
运行报错 
错误如下： 
in `&lt;a rel="nofollow" target="_blank"&gt;class:Person&lt;/a&gt;': uninitialized constant Person::Mongoid (NameError)&lt;/p&gt;

&lt;p&gt;请教各位大大 这个咋解决啊？&lt;/p&gt;</description>
      <author>luciffer</author>
      <pubDate>Thu, 30 Aug 2012 00:52:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/5244</link>
      <guid>https://ruby-china.org/topics/5244</guid>
    </item>
  </channel>
</rss>
