Project

General

Profile

rake db:migrate on Windows

Added by Barbara Post almost 15 years ago

Hello,

I am installing Redmine 0.8 on my Windows Vista machine. With Postgresql since the Mysql 5.0 configuration (at the end of installation) fails.

I edited [redmine root dir]\config\environment.rb and added the following :

ENV['GEM_PATH'] = 'C:\Ruby-186-27\lib\ruby\gems\1.8\gems'

Now the gems search path would be better. But it still fails :

PS C:\xampp\redmine-0.8.4> C:\Ruby-186-27\bin\rake.bat db:migrate RAILS_ENV="production" 
(in C:/xampp/redmine-0.8.4)
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (126: Le module spÚcifiÚ est introu
vable.   - C:/Ruby-186-27/lib/ruby/gems/1.8/gems/pg-0.8.0-x86-mswin32-60/lib/pg.so)

(See full trace by running task with --trace)

PS C:\xampp\redmine-0.8.4> ls C:/Ruby-186-27/lib/ruby/gems/1.8/gems/pg-0.8.0-x86-mswin32-60/lib/pg.so

    Répertoire : Microsoft.PowerShell.Core\FileSystem::C:\Ruby-186-27\lib\ruby\gems\1.8\gems\pg-0.8.0-x86-mswin32-60\li
    b

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        10/06/2009     13:08      86766 pg.so

Installed gems :

actionmailer (2.1.2)
actionpack (2.1.2)
activerecord (2.1.2)
activeresource (2.1.2)
activesupport (2.1.2)
fxri (0.3.6)
fxruby (1.6.16)
hpricot (0.6.164)
log4r (1.0.5)
pg (0.8.0)
ptools (1.1.6)
rails (2.1.2)
rake (0.8.3, 0.8.1)
ruby-opengl (0.60.0)
rubygems-update (1.3.1)
test-unit (2.0.1)
win32-api (1.2.1, 1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)

What is wrong please ? Do I have to "restart something" ?

Thank you,

Barbara


Replies (3)

RE: rake db:migrate on Windows - Added by Barbara Post almost 15 years ago

I corrected the postgresql redmine users rights (found out by "pgsql -U redmine redmine" that it missed connexion right).

I still get the same "module not found" error.

So I wonder about postgresql dll location. Any idea please ?

Thanks,

Barbara

RE: rake db:migrate on Windows - Added by Vlad R almost 15 years ago

Barbara,

Get the dependency walker "depends.exe" from Microsoft ( http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en ) and see what dependencies are not met by pg.so. In my case the missing dependency is:

CYGLDAP-2-3-0.DLL

which comes with the libopenldap2_3_0 Cygwin package. Installing libopenldap2_3_0 fixed the problem.

The original error message was:

Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (No such file or directory - /usr/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.so)

Cheers,
V.

RE: rake db:migrate on Windows - Added by Vlad R almost 15 years ago

You may or may not need to also rebase you DLLs afterwards (I had to.)

If you need to rebase your Cygwin DLL's, you may do so using the 'rebase' package. If it's not already installed, install it. Then make sure no Cygwin processes are still running (e.g., apps started via cygrunsrv) and then open up a bash shell in cmd.exe/ash.exe (not rxvt) and run

$ rebaseall -v

You should be alright after that.

    (1-3/3)