当我尝试在 Rubymine 中运行一些 Rails 命令时,出现以下错误。我最近更改了一些权限以使一些符号链接(symbolic link)正常工作,尽管这可能不相关。
例如,当我运行 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 On 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
关于ruby-on-rails - 在 Rubymine 中运行 Rails 时找不到图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59304221/