Project

General

Profile

Error is: AddDllDirectory failed for path_to_gems/pg-1.2.... » bundle_exec_rake_dbmigrate_error.txt

nonofyour business, 2023-07-23 10:34

 
1
C:\tools\redmine-5.0.5>set RAILS_ENV=production
2

    
3
C:\tools\redmine-5.0.5>bundle exec rake db:migrate --trace
4
rake aborted!
5
Bundler::GemRequireError: There was an error while trying to load the gem 'pg'.
6
Gem Load Error is: AddDllDirectory failed for C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/x64-mingw-ucrt
7
Backtrace for gem load error is:
8
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/dll_directory.rb:104:in `add_dll_directory_winapi'
9
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/dll_directory.rb:64:in `initialize'
10
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/singleton.rb:12:in `new'
11
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'
12
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:15:in `block in <top (required)>'
13
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:26:in `rescue in <top (required)>'
14
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:4:in `<top (required)>'
15
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:60:in `require'
16
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
17
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `each'
18
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `block in require'
19
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `each'
20
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `require'
21
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler.rb:187:in `require'
22
C:/tools/redmine-5.0.5/config/application.rb:18:in `<top (required)>'
23
C:/tools/redmine-5.0.5/Rakefile:5:in `require'
24
C:/tools/redmine-5.0.5/Rakefile:5:in `<top (required)>'
25
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
26
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
27
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
28
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
29
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
30
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
31
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
32
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
33
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
34
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
35
C:/tools/Ruby31/bin/rake:33:in `load'
36
C:/tools/Ruby31/bin/rake:33:in `<main>'
37
Bundler Error Backtrace:
38
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:63:in `rescue in block (2 levels) in require'
39
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:59:in `block (2 levels) in require'
40
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `each'
41
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `block in require'
42
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `each'
43
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `require'
44
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler.rb:187:in `require'
45
C:/tools/redmine-5.0.5/config/application.rb:18:in `<top (required)>'
46
C:/tools/redmine-5.0.5/Rakefile:5:in `require'
47
C:/tools/redmine-5.0.5/Rakefile:5:in `<top (required)>'
48
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
49
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
50
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
51
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
52
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
53
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
54
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
55
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
56
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
57
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
58
C:/tools/Ruby31/bin/rake:33:in `load'
59
C:/tools/Ruby31/bin/rake:33:in `<main>'
60

    
61
Caused by:
62
RubyInstaller::Runtime::DllDirectory::WinApiError: AddDllDirectory failed for C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/x64-mingw-ucrt
63
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/dll_directory.rb:104:in `add_dll_directory_winapi'
64
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/dll_directory.rb:64:in `initialize'
65
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/singleton.rb:12:in `new'
66
C:/tools/Ruby31/lib/ruby/site_ruby/3.1.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'
67
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:15:in `block in <top (required)>'
68
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:26:in `rescue in <top (required)>'
69
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:4:in `<top (required)>'
70
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:60:in `require'
71
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
72
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `each'
73
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `block in require'
74
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `each'
75
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `require'
76
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler.rb:187:in `require'
77
C:/tools/redmine-5.0.5/config/application.rb:18:in `<top (required)>'
78
C:/tools/redmine-5.0.5/Rakefile:5:in `require'
79
C:/tools/redmine-5.0.5/Rakefile:5:in `<top (required)>'
80
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
81
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
82
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
83
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
84
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
85
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
86
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
87
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
88
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
89
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
90
C:/tools/Ruby31/bin/rake:33:in `load'
91
C:/tools/Ruby31/bin/rake:33:in `<main>'
92

    
93
Caused by:
94
LoadError: 126: Das angegebene Modul wurde nicht gefunden.   - C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg_ext.so
95
C:/tools/Ruby31/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:in `require'
96
C:/tools/Ruby31/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:in `block in require'
97
C:/tools/Ruby31/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:299:in `load_dependency'
98
C:/tools/Ruby31/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:in `require'
99
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/pg.rb:5:in `<top (required)>'
100
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:60:in `require'
101
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
102
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `each'
103
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:55:in `block in require'
104
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `each'
105
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler/runtime.rb:44:in `require'
106
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/bundler-2.4.17/lib/bundler.rb:187:in `require'
107
C:/tools/redmine-5.0.5/config/application.rb:18:in `<top (required)>'
108
C:/tools/redmine-5.0.5/Rakefile:5:in `require'
109
C:/tools/redmine-5.0.5/Rakefile:5:in `<top (required)>'
110
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
111
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
112
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
113
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
114
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
115
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
116
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
117
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
118
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
119
C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
120
C:/tools/Ruby31/bin/rake:33:in `load'
121
C:/tools/Ruby31/bin/rake:33:in `<main>'
122

    
123
C:\tools\redmine-5.0.5>cd C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/
124

    
125
C:\Users\user1\.local\share\gem\ruby\3.1.0\gems\pg-1.2.3\lib>ls
126
pg  pg.rb  pg_ext.so
127

    
128
Comment: C:/Users/user1/.local/share/gem/ruby/3.1.0/gems/pg-1.2.3/lib/x64-mingw-ucrt from the error message does not exist
129
It seems like installation of pg 1.2.3 was not done correctly, maybe?
130
Note: "gem intall pg -v '1.2.3' -- --with-pg-dir=C:\tools\postgresql" was necessary before "bundle install"  to work without errors
(2-2/2)