<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Vijay Parikh]]></title>
  <link href="http://vijayparih.com/atom.xml" rel="self"/>
  <link href="http://vijayparih.com/"/>
  <updated>2013-04-26T04:18:26-04:00</updated>
  <id>http://vijayparih.com/</id>
  <author>
    <name><![CDATA[Vijay Parikh]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Rails with Devise and Mongoid]]></title>
    <link href="http://vijayparih.com/blog/2013/04/25/rails-with-devise-and-mongoid/"/>
    <updated>2013-04-25T15:35:00-04:00</updated>
    <id>http://vijayparih.com/blog/2013/04/25/rails-with-devise-and-mongoid</id>
    <content type="html"><![CDATA[<p>Recently, I had a task which used MongoDB as its database. At the beginning, I used MongoMapper as the ORM but finally I found out that I couldn’t use Devise with MongoMapper as the ORM. After searched some articles, it said that I need to use Mongoid if I were to use Devise as its application’s authorization mechanism. Right now, I want to share you my experience installing those two stuffs in Rails 3.</p>

<ol>
<li>Mongoid
These are the steps to install mongoid in your rails 3 :</li>
<li>Rund command &#8216;em install mongoid &#8211;pre&#8217;</li>
<li>Run command gem install bson_ext</li>
<li>Put those installed gems in your Gemfile</li>
</ol>


<p><code>
  gem "mongoid"</p>

<p>  gem "bson_ext"
</code></p>

<ul>
<li>To make sure that everything’s installed properly, please run : &#8220;bundle install&#8221;</li>
<li>Now you can run command rails generate mongoid:config and it will generate a file config/mongoid.yml</li>
</ul>


<p>That’s it and your mongoid has been set up well.</p>
]]></content>
  </entry>
  
</feed>
