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”
Now let’s talk about authentication with devise. I had very beautiful experiences with devise as my authentication tool. It’s so easy handy and easy to use. It gives you a lot of features that you can use for your daily need in authentication process. One thing that I haven’t researched yet is the OAuth part. That part will be interesting!
OK, I had a task that required me to create a custom sign in and sign up page. And also, I have to make custom routes for sign in, sign up, and sign out. That took a long time from me and actually it’s so simple. This is what I did to my application to implement this case. Continue reading “Create Custom Routes and Layout for Sign Up, Sign In, and Sign Out with Devise in Rails 3”
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 :
- Open this file
RAILS_ROOT/.bundle/configand you will find these codes :
- In my case, I added this code :
- After that, re-run bundle install
You’ve finished, restart the apache server, and the error won’t show anymore.
Hello again, coders!
I’d like to talk about captcha (again). Yes, I have a bad experience with captcha for ruby on rails, especially rails 3. At first, I picked simple_captcha as my captcha plugin, but I didn’t see any good prospect from it. I should admit that the captcha image is simple and easy to read, but there always problems with it, especially in deployment. This time the simple_captcha didn’t display the image, and from every article that I had read, I couldn’t find the solution for it. I decided, I had to change the plugin and I chose reCaptcha.
It’s really easy and even easier than simple_captcha. The first step you have to do is go to reCaptcha site and register your site name with your google account to retrieve public and private key that will be used later on. After you register it, you will get the key and keep it for recaptcha configuration in rails. Continue reading “Recaptcha with Rails 3”