Jojo Siao

Icon

enjoying life

Can you suggest a nice user authentication system in Ruby on Rails?

I am currently building a system at work and one of its required features is user authentication. I used restful_authentication in a previous personal project, but last week, I just found out a new simpler user authentication system in railscasts.com called AuthLogic. I tried to integrate it to my project only to encounter another problem. It fails to validate password confirmation form field. Here’s the screenshot to that at twitpic.com.

So, can you suggest a nicer user authentication system in ROR? Please share!

Ruby on Rails Topic: Issue with Paperclip installation

This is in regards to my personal project “frendsmo” which is a facebook/friendster clone.  I am recently trying to build a Gallery page for the users where they can create, edit and delete photo albums.

I looked at railscasts.com and downloaded their video tutorial on how to use Paperclip in ruby on rails. While in the video, it was mentioned that you have to have ImageMagick and RMagick installed to use Paperclip.

So there I was, immediately,  I opened up putty (windows SSH client) to connect to our fedora web server and searched google for any step by step installation procedure.

I did the installation on ImageMagick easily and after that I did RMagick installation by doing ‘gem install rmagick’.

I encountered an issue when I had to test to see if everything (all installations) went smoothly. When I had to do

"irb -rubygems -r RMagick"

This complained that RMagick.so shared library could not be found.  Our common friend named Google told me to do

"ldconfig /usr/local/lib"

and it really fixed everything! nice!  But I wasn’t really contented without knowing what is the use of ldconfig, so I did,

"man ldconfig"

and found out that,

       "...ldconfig creates the necessary links  and  cache  to  the  most  recent
        shared  libraries  found  in  the  directories specified on the command
        line, in the file /etc/ld.so.conf, and in the trusted directories (/lib
        and  /usr/lib).  The cache is used by the run-time linker, ld.so or ld-linux.so. 
        ldconfig checks the header and filenames of the libraries it
       encounters  when  determining  which  versions  should have their links
       updated."

Now , I’m off to continue coding my ruby on rails project. Hope that helps!

Note:

  1. I just recently got interested to try out this one, from jim neath’s blog, you can use swfupload with RMagick and Ruby on Rails. Here’s the link to his blog post: http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/
  2. Jim Neath has also a blog post regarding creating Social Networking Sites in Ruby on Rails. url:
    http://jimneath.org/2008/04/25/building-a-social-network-site-in-rails/

Deploying Rails Apps in Passenger in SubURIs

This is for future reference to other rails developers that uses Passenger, (which might be helpful to beginners as well.)

Steps:
1. create a symbolic link that points to your rails public directory from the DocumentRoot.

2. edit httpd.conf and add VirtualHost.

a.) add DocumentRoot
b.) add RailsBaseURI “< /rails-app-subdir > ”

3. edit environment.rb of your rails app and add at the end of file:
config.action_controller.relative_url_root = “/frendsmo” # with the slash !

Note: I follow these configurations using edge rails.

Video: Writing Multi-Tenant Applications in Rails

First look at Akelos PHP Framework

Since I couldn’t sleep well last night,  I just thought it was my chance to see and try out how to use Akelos PHP framework.  It is said to be a port of Ruby on Rails, and so , it sounds like it (should) runs like Cakephp.

Well, I was impressed. Everything went well for me as newbie of this PHP framework because (I think) every step is done thru web interface and there is also some documentation included with it so just in case you lost yourself when following instructions.

Read the rest of this entry »