Project

General

Profile

How to change db from MySQL to PostgreSQL

Added by Leonid E over 11 years ago

Hello,

I have pre installed redmine with MySQL DB and PostgreSQL dump from my old redmine essence.
After the changes in /redmine/redmine/config/database.yml

From

production:  
  adapter: mysql
  database: redmine_db
  host: localhost
  username: redmine_user
  password: "rtyuivtcrc" 
  encoding: utf8

To

production:
  adapter: postgresql
  database: redmine_db
  host: localhost
  username: redmine_user
  password: rtyuivtcrc
  encoding: utf8

I have a problem with start up — it fails with Error: "Ruby (Rack) application could not be started"

/var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/resolver.rb    296    in `resolve' 
1    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/resolver.rb    168    in `start' 
2    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/resolver.rb    129    in `resolve' 
3    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/resolver.rb    128    in `catch' 
4    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/resolver.rb    128    in `resolve' 
5    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/definition.rb    179    in `resolve' 
6    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/definition.rb    114    in `specs' 
7    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/definition.rb    159    in `specs_for' 
8    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/definition.rb    148    in `requested_specs' 
9    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/environment.rb    18    in `requested_specs' 
10    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb    13    in `setup' 
11    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb    120    in `setup' 
12    /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/setup.rb    17    
13    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    59    in `gem_original_require' 
14    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    59    in `require' 
15    /home/redmine/redmine/config/boot.rb    6    
16    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    36    in `gem_original_require' 
17    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    36    in `require' 
18    /home/redmine/redmine/config/application.rb    1    
19    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    36    in `gem_original_require' 
20    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    36    in `require' 
21    /home/redmine/redmine/config/environment.rb    2    
22    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    36    in `gem_original_require' 
23    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb    36    in `require' 
24    config.ru    3    
25    /usr/lib/ruby/vendor_ruby/rack/builder.rb    51    in `instance_eval' 
26    /usr/lib/ruby/vendor_ruby/rack/builder.rb    51    in `initialize' 
27    config.ru    1    in `new' 
28    config.ru    1

What is wrong? What else I have to change?

p.s. The $ rake db:migrate RAILS_ENV=production does not work either