Project

General

Profile

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

nonofyour business, 2023-07-23 10:34

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

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

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

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

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

    
126
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
127
It seems like installation of pg 1.2.3 was not done correctly, maybe?
128
Note: "gem intall pg -v '1.2.3' -- --with-pg-dir=C:\tools\postgresql" was necessary before "bundle install"  to work without errors
(1-1/2)