Jojo Siao

Icon

enjoying life

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/