Project

General

Profile

Error installing redmine with bundle install

Added by Michael Reed over 11 years ago

I am trying to install redmine on my Centos 5.8 box per http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_5.

I went with:
  • ruby-1.8.7.p358.tar.gz (per the article)
  • rubygems-1.4.2.tgz (per the article)
  • redmine-2.0.3.tar.gz (instead of redmine-1.3.2.tar.gz)

I installed redmine at /home/site1/redmine instead of /var/www/redmine where /home/site1/redmine is a HTML document root folder.

Then...

[root@vps redmine]# bundle install
You cannot specify the same gem twice with different version requirements. You specified: i18n (~> 0.6.0) and i18n (= 0.4.2)

So I comment out gem "i18n", "0.4.2" in /home/site1/redmine/Gemfile
[root@vps redmine]# bundle install
You cannot specify the same gem twice with different version requirements. You specified: coderay (~> 1.0.6) and coderay (~> 0.9.7)

So I comment out gem "coderay", "~>0.9.7" in /home/site1/redmine/Gemfile

[root@vps redmine]# bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/.......
Bundler could not find compatible versions for gem "rack":
  In Gemfile:
    rails (= 3.2.6) ruby depends on
      rack (~> 1.4.0) ruby

    rack (1.1.0)

Could anyone help? Thank you


Replies (21)

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Hello everyone.

Any suggestions? I've tried to install on two servers, and get the same errors on each. I suppose I could attempt to install redmine-1.3.2.tar.gz as it is the same version used by the tutorial, but would rather use the most current Redmine. Thank you

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Please?

FYI - On the second server, I installed it at the recommended /var/www/redmine and not /home/site1/redmine, but no success.

Thank you

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

You're not attempting to install with any plugins are you?

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

No, Just following the tutorial. I am almost just about somewhat Linux adept (or trying really hard to get there!) but know nothing about ruby and gems other than what I have learned during this endeavor.

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

Ah should have read the tutorial:

Remove the gemfile found here: /var/www/redmine/Gemfile

Redmine as of 1.4 comes with it's own Gemfile, I think it's mixing them up.

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Thank you William, Tried your suggestion, and received the following.

[root@localhost redmine]# bundle install
Could not locate Gemfile

I'm at my wits end!  Should I ignore the tutorial?  Should I do something else? Should I give up?

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

Pull the gemfile out of redmine-2.0.3.tar.gz, place it in your Redmine directory, do not edit it, run bundle install.

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Hi William,

Tried it but no success.

Please see the below. I searched my system for pg_config, but it doesn't exist.

Any suggestions? Maybe I give up on the Centos/Redmine tutorial, and use something else? I have never dealt with Ruby/Rails/Gems before now.

Thank you for your help and patience. Michael

[root@localhost redmine]# bundle install
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.6)
Using builder (3.0.0)
Using activemodel (3.2.6)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.6)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.6)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.6)
Using activeresource (3.2.6)
Using bundler (1.1.5)
Using coderay (1.0.7)
Using fastercsv (1.5.5)
Using json (1.7.4)
Using metaclass (0.0.1)
Installing mocha (0.12.2)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Installing pg (0.14.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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=/usr/local/bin/ruby
        --with-pg
        --without-pg
        --with-pg-dir
        --without-pg-dir
        --with-pg-include
        --without-pg-include=${pg-dir}/include
        --with-pg-lib
        --without-pg-lib=${pg-dir}/lib
        --with-pg-config
        --without-pg-config
        --with-pg_config
        --without-pg_config

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/pg-0.14.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/pg-0.14.0/ext/gem_make.out
An error occured while installing pg (0.14.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.0'` succeeds before bundling.
[root@localhost redmine]#

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

Missing postgreSQL libs:

yum install postgresql-devel

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Thanks William,

Followed your advise, however, no change. Isn't postgresql just database related?

Thank you for your continued support. Michael

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

Michael Reed wrote:

Thanks William,

Followed your advise, however, no change. Isn't postgresql just database related?

Thank you for your continued support. Michael

Yeah, it's trying to install the postgresql database driver gem, that should have fixed it.

You can try removing pg from the Gemfile, if you're not using that as your database.

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

It would be best to figure out why CentOS isn't providing libpq-fe.h in the postgresql-devel package like it should though...

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Thanks William, I agree. The first error which occurred dealt with Installing pg (0.14.0), then later libpq-fe.h.

The tutorial I was using didn't discuss postgresql at all. Is it required with new redmine versions but not old? I would prefer to keep with mysql since I know it if possible. If required, sounds like I should have installed it first. If not required, why is my configuration trying to utilize it?

Thanks again!

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

Michael Reed wrote:

Thanks William, I agree. The first error which occurred dealt with Installing pg (0.14.0), then later libpq-fe.h.

The tutorial I was using didn't discuss postgresql at all. Is it required with new redmine versions but not old? I would prefer to keep with mysql since I know it if possible. If required, sounds like I should have installed it first. If not required, why is my configuration trying to utilize it?

Thanks again!

It's just bundler trying to prepare all gems you COULD use as per Redmine's gem listings. Did removing this gem from the list fix it?

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

Did removing this gem from the list fix it?

Unfortunately not. I commented out all parts in Gemfile that pertained to pg, and got the following.

First error was:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

In then asked me to look at mkmf.log, but as you see I have 28 of mkmf.log files! Which one should I look at?

Thanks!!!

[root@localhost redmine]# bundle install
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.6)
Using builder (3.0.0)
Using activemodel (3.2.6)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.6)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.6)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.6)
Using activeresource (3.2.6)
Using bundler (1.1.5)
Using coderay (1.0.7)
Using fastercsv (1.5.5)
Using json (1.7.4)
Using metaclass (0.0.1)
Using mocha (0.12.2)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Installing rack-ssl (1.3.2)
Installing rdoc (3.12)
Installing thor (0.15.4)
Installing railties (3.2.6)
Installing rails (3.2.6)
Installing prototype-rails (3.2.1)
Installing ruby-openid (2.1.8)
Installing rack-openid (1.3.1)
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

  • 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=/usr/local/bin/ruby

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

[root@localhost redmine]# find / -name mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/dbm/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/syslog/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/gdbm/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/Win32API/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/socket/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/readline/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/bigdecimal/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/iconv/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/syck/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/digest/sha1/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/digest/md5/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/digest/rmd160/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/digest/sha2/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/pty/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/curses/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/tk/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/dl/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/io/wait/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/openssl/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/win32ole/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/etc/mkmf.log
/root/Downloads/ruby-1.8.7-p358/ext/zlib/mkmf.log
/usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/mkmf.log
/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.14/ext/ruby/ruby-1.8.7-x86_64-linux/mkmf.log
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mkmf.log
/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.15/ext/ruby/ruby-1.8.7-x86_64-linux/mkmf.log
/usr/local/lib/ruby/gems/1.8/gems/pg-0.14.0/ext/mkmf.log
[root@localhost redmine]#

RE: Error installing redmine with bundle install - Added by William Roush over 11 years ago

Missing rmagick libs, run this:

yum install ImageMagick-devel

Run gem install again.

RE: Error installing redmine with bundle install - Added by Terence Mill over 11 years ago

bundle install --without development test pg postgresql
something like that would be mor easy then uncommenting everything.

RE: Error installing redmine with bundle install - Added by Michael Reed over 11 years ago

William, Your Awesome! yum didn't work as it installed an old version, but installing ImageMagick from source did the trick!

Now I just have to figure out how to start and use redmine :)

Thank you very much for you help!

RE: Error installing redmine with bundle install - Added by Ravi GH almost 11 years ago

http://www.ruby-forum.com/topic/190824

sudo apt-get install libmagickcore-dev libmagickwand-dev
The above command helped me to fix the error.

RE: Error installing redmine with bundle install - Added by Shruthi SS about 9 years ago

I got this error while installing bundal please help me out

Your Gemfile lists the gem jquery-ui-rails (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
You cannot specify the same gem twice with different version requirements.
You specified: spreadsheet (>= 0) and spreadsheet (~> 0.6.8)

    (1-21/21)