Archive | September, 2008 pain

17 Sep

We are using rmagic 1.15.11 gem which is inside our source tree.

On CentOS i had installed:
rpm -qa | grep -i magick

But when i tried to run mongrel I got:

#<noMethodError: undefined method `configuration' for #>
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /home/jtsoong/chipmeup/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:509:in `require'
from /home/jtsoong/chipmeup/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'

I then downloaded the tar ball of ImageMagick (the same version 6.4.3-6) and installed that (straight ./configure; make; make install)

I then got this error:
/usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/ /usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/ undefined symbol: Init_RMagick - /usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/ (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
from /home/jtsoong/chipmeup/vendor/rails/activerecord/lib/../../activesupport/lib/act

To fix this I linked in the new (in actual fact the new gem had created

sudo ln -s /usr/lib/ /usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/

A gem list shows the gem installed:

rmagick (2.6.0)

This now works, but is an ugly hack..


Sendmail erros

15 Sep

I was receiving:”dsn=5.6.0, stat=Data format error” in maillogs for certain addresses…

To get more information do:

( echo subject: test; echo ) | sendmail -Am -v -f

This might end up telling you that you’re on a DNS block list.

Rails setup

10 Sep

1. Get source code from repository
2. Install Ruby
3. Get RubyGems tarball from
4. Explode tarball, run “ruby setup.rb” – this will install gems
5. Install mongrel: “gem install mongrel”
6. To run mongrel: “mongrel_rails start”

Note if there are complaints about RMagick/ImageMagick:
(e.g.: “/usr/lib/ruby/gems/1.8/gems/rmagick-2.5.2/lib/ cannot open shared object file: No such file or directory – /usr/lib/ruby/gems/1.8/gems/rmagick-2.5.2/lib/ (LoadError)”)

  • Get the ImageMagick tarball
  • cd ImageMagick-xxx
  • ./configure
  • make
  • sudo make install
  • sudo gem install rmagick
  • export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
  • mongrel_rails start

Group Ownership of files

9 Sep

If you want group ownership of all files created in a directory do:

chmod -R g+s myfolder