簡體   English   中英

kernel_require.rb:15:in `require': 無法加載此類文件 -- 3.0/pg_ext (LoadError)

[英]kernel_require.rb:15:in `require': cannot load such file -- 3.0/pg_ext (LoadError)

C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require': cannot load such file -- 3.0/pg_ext (LoadError)
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-0.18.4-x64-mingw32/lib/pg.rb:14:in `rescue in <main>'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-0.18.4-x64-mingw32/lib/pg.rb:3:in `<main>'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:60:in `block (2 levels) in require'
        from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:55:in `each'
        from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:55:in `block in require'
        from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:44:in `each'
        from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:44:in `require'
        from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler.rb:176:in `require'
        from D:/Onl_course/Ruby/David_Battersby/instagram-clone/config/application.rb:7:in `<main>'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-7.0.1/lib/rails/commands/server/server_command.rb:137:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-7.0.1/lib/rails/commands/server/server_command.rb:134:in `perform'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-7.0.1/lib/rails/command/base.rb:87:in `perform'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-7.0.1/lib/rails/command.rb:48:in `invoke'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/railties-7.0.1/lib/rails/commands.rb:18:in `<main>'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'

來源 "https://rubygems.org" git_source(:github) { |repo| “https://github.com/#{repo}.git”}

ruby "3.0.3" gem "rails", "~> 7.0.1" gem "sprockets-rails" gem 'pg' gem "puma", "~> 5.0" gem 'devise' gem "importmap-rails" gem" turbo-rails" gem "stimulus-rails" gem "jbuilder" gem "tzinfo-data",平台:%i[ mingw mswin x64_mingw jruby ] gem "bootsnap",要求:false gem "sassc-rails" gem 'bootstrap', '~> 5.1.3' group:development, :test do gem "debug", 平台: %i[ mri mingw x64_mingw ] end group:development do gem "web-console" end group:test do gem "capybara" gem" selenium-webdriver" gem "webdrivers" 結束

據我了解,在 Unix 上,當不存在此類共享模塊的依賴項時,加載共享模塊時會出現“文件不存在”的誤導性錯誤。 這里也可能是一個案例。

缺少的一個明顯依賴項是 Postgresql 客戶端庫。 您應該安裝 Postgresql 以嘗試解決此問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM