Implementing Resque/Redis on Rails 3

Hi coders! I have a new experience here with Rails 3 and I want to share it.

I have task to create a code running on background with Rails 3 and I found that I need to use Resque/Redis to make it happen. Okay, first you need to download Redis from its origin site at http://redis.io/download. Just follow the instruction there and you will be fine.

This is the main part of this post. But actually, I also followed some instruction from a blog. You can visit it directly to http://tommy.chheng.com/index.php/2010/10/how-to-run-background-processes-using-resqueredis-in-a-ruby-on-rails-app/. Honestly, it was a bliss. These are my steps on doing it: Continue reading “Implementing Resque/Redis on Rails 3”

Advertisements

Setting Up FTP Server on Debian

Hi guys!

I had a task and that was to establish ftp server on a server ran on Debian Lenny OS. I just want to share my experience, maybe one of you meet the same task, so you don’t need to worry anymore. Ok, this is what I did :

  1. Install vsftpd package by running apt-get install vsftpd, if you’re not the root run it like this sudo apt-get install vsftpd.
  2. If you want to make your ftp open for public access, then you’ve done it! Just connect the server via ftp tools, fill in your host name, then fill the username field with ‘anonymous’ or ‘ftp’ and leave the password field blank, then connect. But, if you want to restrict the access with a certain account then continue the instruction.

  3. Make a new account, let’s say ‘ftp-user’. Run this command to create a new user adduser ftp-user. (again, if you’re not root user you have to put sudo in front of the command). Continue reading “Setting Up FTP Server on Debian”

Experiencing Simple_Captcha for Rails 3

A while ago, I was looking for a plugin that working for Rails 3. When I searched the internet, I found simple_captcha and I tried it. My first experience using it was bad. I followed the instruction in https://github.com/galetahub/simple-captcha but I failed, the image code wouldn’t show. I almost frustrated until I found it myself. The key was I combined the instruction from the original site with the article I found at http://blog.brijeshshah.com/simple-captcha-in-rails-3/. Continue reading “Experiencing Simple_Captcha for Rails 3”

Mongoid and Devise in Rails 3

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. Continue reading “Mongoid and Devise in Rails 3”