Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-15-2008, 12:39 PM   #1
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55

Rep: Reputation: 15
RMagick shared libraries problem (ruby on rails setup)

I am attempting to get ruby on rails to working on my server. When i attempted to start the rails application through cpanel i get a following error

 following error** Daemonized, any open files are closed.  Look at log/ and log/mongrel.log for info.
** Starting Mongrel listening at
** Starting Rails with production environment...
/usr/lib/ruby/gems/1.8/gems/rmagick-2.2.2/lib/ cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/1.8/gems/rmagick-2.2.2/lib/ (LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/rmagick-2.2.2/lib/RMagick.rb:11
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
         ... 24 levels...
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
        from /usr/bin/mongrel_rails:16:in `load'
        from /usr/bin/mongrel_rails:16
but all the files shared files seem to be setup properly i think

lrwxrwxrwx  1 root root     33 May 15 16:29 -> /usr/local/lib/
-rw-r--r--  1 root root  58315 May 15 11:21 RMagick.rb
-rwxr-xr-x  1 root root 342899 May 15 11:21
lrwxrwxrwx  1 root root     31 May 15 17:01 -> /usr/local/lib/
lrwxrwxrwx  1 root root     33 May 15 16:39 -> /usr/local/lib/
lrwxrwxrwx  1 root root     31 May 15 17:00 -> /usr/local/lib/
lrwxrwxrwx  1 root root     33 May 15 16:59 -> /usr/local/lib/
drwxr-xr-x  2 root root   4096 May 15 11:21 rvg
Can anyone suggest a course of action?
Old 05-20-2008, 05:37 AM   #2
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55

Original Poster
Rep: Reputation: 15

Can anyone advise?
Old 05-23-2008, 05:16 AM   #3
LQ Newbie
Registered: May 2008
Posts: 3

Rep: Reputation: 0
I came across your question while looking for a solution to the same problem =) So far I've found the following advice:

before you compile ImageMagick set following Enviroment Variable:
LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"

With this option ImageMagick looks at /usr/local/lib for the libraries.


Hope that helps because I registered just so I could give you an answer =) But yeah, I just finished recompiling ImageMagick and it seems to have done the trick for me.

Be sure to gem install rmagick after re-installing ImageMagick so that it links to the new libraries
Old 08-17-2008, 03:41 PM   #4
LQ Newbie
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
How/where do you change this environment variable?

The installation instruction file says:

If you are willing to accept configure's default options, and build from
within the source directory, type:


and watch the configure script output to verify that it finds everything
that you think it should. If it does not, then adjust your environment
so that it does.

By default,

make install

will install the package's files in `/usr/local/bin', `/usr/local/lib', etc..
You can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PATH'. This is valuable in case you don't
have privileges to install under the default paths or if you want to install
in the system directories instead.

So I assume you would type in ./configure (path), but I don't understand exactly how to format this. If I want to put in in usr/local/lib, what would I type?

Also I want to start over. The instruction file states:

* Remove everything in the build directory created by 'configure' and 'make'.
This is useful if you want to start over from scratch.

make distclean

I ran:
cd ImageMagick-6.4.2
make distclean

and get the error:
make: *** No rule to make target `distclean'. Stop.
Old 08-18-2008, 06:57 AM   #5
LQ Newbie
Registered: May 2008
Posts: 3

Rep: Reputation: 0
Hi goldenbough

You can type

export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
at your promt to set the LDFLAGS. Remember that this will only be set for that session, so as soon as you log out the setting will be lost. Likewise, if you open a new tab or so forth it will not have this setting.

To install to /usr/local you'd type

./configure --prefix=/usr/local
You more than likely WOULDN'T want to install it to /usr/local/lib (I'm guessing you just used that as an example, but just want to make sure you realise that).

I'm not sure why make distclean didn't work for you. Perhaps you haven't run make yet (so there is nothing to clean up). Just a guess though. However - and I'm subject to correction here - I don't believe it is necessary for you to run it, as when you run ./configure and make, they will simply overwrite your old files, meaning that it's really irrelevant whether you run make distclean before or not.

Hope that helps


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP v Ruby/Ruby on Rails Neko_D Linux - General 4 02-09-2007 12:56 AM
MythTV Setup: error while loading shared libraries: djgerbavore Slackware 4 10-09-2006 07:12 PM
Getting started with Ruby on Rails Ephracis Linux - Server 1 09-24-2006 04:40 PM
LXer: Ruby on Rails LXer Syndicated Linux News 0 02-16-2006 05:16 PM
LXer: Ruby off the Rails LXer Syndicated Linux News 0 12-24-2005 05:31 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration