Image Upload with Carrierwave and Mongoid (GridFS – MongoDB) in Rails 3

Hello again, coders! Now I’m back with a topic to be discussed and it’s about Mongoid. Yap! Recently, I have a task that required me to upload images, but I have to use MongoDB as data management service. For uploader I chose Carrierwave and I use MongoDB’s feature to handle big files, that is GridFS. Actually, it’s not difficult to set all things up, but first you need to establish the mongoid service in your rails, you can refer it to my previous post. Now let’s get into the main topic. Continue reading “Image Upload with Carrierwave and Mongoid (GridFS – MongoDB) in Rails 3”


Phusion Passenger Problem : Please run `bundle install` (Bundler::GitError)

Have you found this kind of error? I have, once. I already done it actually (run bundle install), but the error message kept on showing. So what’s the problem?

I searched some articles and I found out it was so simple. These are the steps :

  1. Open this file RAILS_ROOT/.bundle/config and you will find these codes :
  2. In my case, I added this code :
    BUNDLE_PATH: /home/.bundler
  3. After that, re-run bundle install

You’ve finished, restart the apache server, and the error won’t show anymore.