簡體   English   中英

安裝pg(1.1.4)時發生錯誤,並且Bundler無法繼續

[英]An error occurred while installing pg (1.1.4), and Bundler cannot continue

試圖執行bundle

$ gem install pg -v '1.1.14' --source 'https://rubygems.org/'

寶石文件將保留安裝在/home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/pg-1.1.4中,以進行檢查。 結果記錄到/home/saishbhende24/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/pg-1.1.4/gem_make.out錯誤在安裝pg(1.1.4)時發生錯誤,並且Bundler無法繼續。 捆綁之前,請確保gem install pg -v '1.1.4' --source 'https://rubygems.org/'成功。 在Gemfile中:pg saishbhende24 @ DESKTOP-ELUO53H:/mnt/c/saishrails/r5.1 $ gem install pg -v '1.1.14' --source 'https://rubygems.org/' -v'1.1.14 $ gem install pg -v '1.1.14' --source 'https://rubygems.org/' --source'https://rubygems.org/ $ gem install pg -v '1.1.14' --source 'https://rubygems.org/'錯誤:找不到任何存儲庫中的有效gem'pg'(= 1.1.14)錯誤:可能的選擇:pg

輸出是rails server

確保已安裝Windows的postgres。 這里有官方安裝程序 然后再試一次。

然后,如果仍然遇到問題,請嘗試首先通過以下方式手動安裝pg gem:

bundle install pg

如果仍然遇到問題,您還可以在docker上查看運行的rails,postgres以及所有其他依賴項,例如其余的gem,redis等。 在Windows上運行紅寶石是一個令人震驚的經歷。 有很多事情並不像在Linux上那樣簡單。 如果您仍然遇到問題,Docker可以為您解決很多此類問題。

gem sources --add https://rubygems.org/ 

解決了此問題。

暫無
暫無

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

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