在 Rubymine 中 运行 rails 时找不到图像

Image not found when running rails in Rubymine

我在我的 Rubymine 中尝试 运行 某些 rails 命令时遇到以下错误。我最近更改了一些权限以使一些符号链接起作用,尽管这可能不相关。

例如,当我 运行 rails c 我得到这种类型的错误。

RAILS_GROUPS is unset; defaulting to web,worker
/Users/paul/.rvm/gems/ruby-2.4.1/gems/pg-0.20.0/lib/pg.rb:4:in `require': dlopen(/Users/paul/.rvm/gems/ruby-2.4.1/gems/pg-0.20.0/lib/pg_ext.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/opt/postgresql/lib/libpq.5.dylib
  Reason: image not found - /Users/paul/.rvm/gems/ruby-2.4.1/gems/pg-0.20.0/lib/pg_ext.bundle (LoadError)
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/pg-0.20.0/lib/pg.rb:4:in `<top (required)>'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `require'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `block (2 levels) in require'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `each'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `block in require'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `each'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `require'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/bundler.rb:114:in `require'
        from /Users/paul/labstat1/labstat1/config/application.rb:29:in `<top (required)>'
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:92:in `require'
        from /MacBook-Pro:labstat1 paul$ Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:92:in `preload'
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
        from /Users/paul/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Users/paul/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from -e:1:in `<main>'

这似乎不是 Ruby Rails/Rubymine 问题,而是 MacOS 问题。

来自https://github.com/kelaberetiv/TagUI/issues/86

There is a new dependency in newer versions of macOS. To fix the error do the following. It installs Homebrew (a package manager for macOS) and installs OpenSSL for https connections.

If you do not have Homebrew or don't know what is Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Or if you already have Homebrew installed

brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb