error upgrading to redmine 1.4.1

Added by Kelly Goedert over 9 years ago

Hi,

I am trying to upgrade from version 1.3 to 1.4.1 on step 6 of the migration guide http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade#Step-1-Check-requirements I get an error saying something is missing. The database I am using is mysql. Below is the commands I executed and the outputs

redmine@redmine:~/redmine-1.4.1$ sudo rake config/initializers/session_store.rb
Invalid gemspec in [/var/lib/gems/1.8/specifications/holidays-1.0.4.gemspec]: invalid date format in specification: "2011-10-19 00:00:00.000000000Z" 
Invalid gemspec in [/var/lib/gems/1.8/specifications/holidays-1.0.4.gemspec]: invalid date format in specification: "2011-10-19 00:00:00.000000000Z" 
Invalid gemspec in [/var/lib/gems/1.8/specifications/holidays-1.0.4.gemspec]: invalid date format in specification: "2011-10-19 00:00:00.000000000Z" 
Some gems may need to be installed or updated.
Please run `bundle install --without development test`.
redmine@redmine:~/redmine-1.4.1$ sudo bundle install --without development test
Invalid gemspec in [/var/lib/gems/1.8/specifications/holidays-1.0.4.gemspec]: invalid date format in specification: "2011-10-19 00:00:00.000000000Z" 
Invalid gemspec in [/var/lib/gems/1.8/specifications/holidays-1.0.4.gemspec]: invalid date format in specification: "2011-10-19 00:00:00.000000000Z" 
Invalid gemspec in [/var/lib/gems/1.8/specifications/holidays-1.0.4.gemspec]: invalid date format in specification: "2011-10-19 00:00:00.000000000Z" 
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2) 
Using activesupport (2.3.14) 
Using rack (1.1.3) 
Using actionpack (2.3.14) 
Using actionmailer (2.3.14) 
Using activerecord (2.3.14) 
Using activeresource (2.3.14) 
Using coderay (1.0.6) 
Using fastercsv (1.5.4) 
Using i18n (0.4.2) 
Using mysql (2.8.1) 
Using net-ldap (0.3.1) 
Installing pg (0.13.2) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.8 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/bin/ruby1.8
    --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 /var/lib/gems/1.8/gems/pg-0.13.2 for inspection.
Results logged to /var/lib/gems/1.8/gems/pg-0.13.2/ext/gem_make.out
An error occured while installing pg (0.13.2), and Bundler cannot continue.
Make sure that `gem install pg -v '0.13.2'` succeeds before bundling.

I tried the gem install pg command suggested but it did not work either. Can somebody help?

Thanks

Kelly

Replies (6)

RE: error upgrading to redmine 1.4.1 - Added by Alex A over 9 years ago

U must connment pg, sqlite references in redmine Gemfile.

RE: error upgrading to redmine 1.4.1 - Added by Kelly Goedert over 9 years ago

This may seem very basic but I am completely newbie in ruby. Can you give me pointers on how to do that?

Thanks

Kelly

RE: error upgrading to redmine 1.4.1 - Added by WaZaA AzA over 9 years ago

I'm in the same case :s

RE: error upgrading to redmine 1.4.1 - Added by Kelly Goedert over 9 years ago

I dont know if I did the right thing or not... but in my redmine-1.4 root install dir there is a Gemfile and I comment out this part

  1. Database gems
    #platforms :mri, :mingw do # group :postgresql do # gem "pg", ">= 0.11.0"
    #end

    #group :sqlite do # gem "sqlite3"
    #end
    #end

The error disappeared... but again, since I am not familiar with ruby and its tools I dont know if I did the right thing.

RE: error upgrading to redmine 1.4.1 - Added by WaZaA AzA over 9 years ago

I think I have found. You need to edit the 'Gemfile' file and delete (or comment) the line for postgresql and sqlite, like this :

# Database gems
#platforms :mri, :mingw do
#  group :postgresql do
#    gem "pg", ">= 0.11.0" 
#  end
#
#  group :sqlite do
#    gem "sqlite3" 
#  end
#end

(can you see, use '#' to comment).

I'm not sure it really works, because I still have a lot of problem :s with mysql, activerecord-mysql2-adapter...
I don't understand that an update causes as many problems, yet everything work fine until now...

EDIT: Don't change the name of the adapter in config/database.yml for 'mysql2' if your are on ruby 1.8.7! Teach me to read properly...

RE: error upgrading to redmine 1.4.1 - Added by Alex A over 9 years ago

Also you can execute bundler like

bundle install  --without development test postgresql sqlite 

to exclude any gems that you don't need.

(1-6/6)