[英]Library not loaded: libssl.1.1.dylib (LoadError) when trying to run rails server and connect to mysql
[英]PostgreSQL - Rails Server Crashing on Start "Library not loaded...(LoadError)"
我正在建立一個 Rails 項目。 每次去啟動服務器,都會報錯;
rails server puma
warning: ignoring extraneous `ruby-' prefix in version `ruby-2.0.0-p247'
(set by /Users/jamesnewman/shout_factory/.ruby-version)
/Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg.rb:4:in `require': dlopen(/Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg_ext.bundle, 9): Library not loaded: /Users/jamesnewman/.rvm/rubies/ruby-2.0.0-p247/lib/libruby.2.0.0.dylib (LoadError)
Referenced from: /Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg_ext.bundle
Reason: image not found - /Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg_ext.bundle
為了嘗試解決這個問題,我已經完成了;
還有更多我可能已經忘記的修復嘗試。 我已經從不同的終端命令中搜索並嘗試了幾乎所有類似的修復,從 rvm 切換到 rbenv。
只是為了讓我知道這是我遇到困難的項目,而不是其他項目,我在我的其他幾個項目中啟動了服務器,一切正常。
如果有人對如何解決此問題有任何幫助,我將不勝感激。 如果有人需要查看我正在使用的寶石或其他東西,我很樂意發布它。
注意:此問題可以解決。 如果其他人有此問題,則可以解決。 可能有所不同,但是對我而言,我能夠通過卸載所有gems並重新從頭開始重新安裝並設置整個項目/系統來對其進行修復。 我做錯了事,但可以解決。
希望這對任何有類似問題的人有所幫助。
由於端口更改,將 PG 從 14 降級到 13 后,我剛剛遇到了這個問題。 對我pg
的解決方案是卸載pg
gem,然后重新安裝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.