Sunday, September 06, 2009

Few more notes about Redmine installation

This is in continuation to earlier post Getting started with Redmine where I jotted down my experience about installation of Redmine and other required packages. When I attempted to install Redmine in another machine with slightly different configuration and in different manner, I stumbled upon few more facts.

  • zlib-devel package should be installed and that too before installing ruby. Though ruby, rubygem and rake will be installed without any problem but installation of rails (gem install rails) will fail due to lack of zlib-devel.
  • If PostgreSQL is installed from a RPM package, say yum install postgresql-server. Then PostgreSQL installation will not have pg_config file and installation of PostgreSQL adaptor for ruby (gem install pg) will fail as installer script uses pg_config during installation. In absence of this file PostgreSQL adaptor will fail with an error like below-

        [vinod@localhost opt]$ gem install pg
        Building native extensions. This could take a while...
        ERROR: Error installing pg:
        ERROR: Failed to build gem native extension.

        /opt/ruby-1.8.7/bin/ruby extconf.rb
        extconf.rb:1: command not found: pg_config --version
        ERROR: can't find pg_config.
        HINT: Make sure pg_config is in your PATH
        *** extconf.rb failed ***
        Could not create Makefile due to some reason, probably lack of
        necessary libraries and/or headers. Check the mkmf.log file for more
        details. You may need configuration options.

        Provided configuration options:
            --with-opt-dir
            --without-opt-dir
            --with-opt-include
            --without-opt-include=${opt-dir}/include
            --with-opt-lib
            --without-opt-lib=${opt-dir}/lib
            --with-make-prog
            --without-make-prog
            --srcdir=.
            --curdir
            --ruby=/opt/apps/ruby-1.8.7/bin/ruby

    Gem files will remain installed in /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/pg-0.8.0 for inspection.
    Results logged to /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/pg-0.8.0/ext/gem_make.out
  • OpenSSL develipment headers are required by Phusion Passenger. Without this Passenger installation will fail with an error like-
        * OpenSSL support for Ruby... not found

        * To install OpenSSL support for Ruby:
        Please (re)install Ruby with OpenSSL support by downloading it from http://www.ruby-lang.org/.


    To overcome this first install openssl-devel package
          yum install openssl-devel

    Then execute following script from Ruby installation-
          /opt/ruby-1.8.7-p174/ext/openssl/ruby extconf.rb --with-openssl-dir=/usrl/local/ssl

    Now passenger installation will succeed.
I think there were few more things I stumbled upon, but lost their track during all this exercise.

0 Comments: