在Rubymine中运行rails时找不到图像 [英] Image not found when running rails in Rubymine

查看:50
本文介绍了在Rubymine中运行rails时找不到图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在Rubymine中运行一些rails命令时出现以下错误.我最近更改了一些权限,以使某些符号链接正常工作,尽管这可能没有关系.

I'm getting the following error when trying to run some rails commands in my Rubymine. I have recently changed some permissions to get some symlinks to work although this may not be related.

例如,当我运行 rails c 时,会出现此类错误.

For example when I run rails c I get this type of error.

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.

It doesn't seem to be a Ruby On Rails/Rubymine issue but a MacOS one.

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

在更高版本的macOS中存在新的依赖项.要纠正该错误,请执行以下操作.它会安装Homebrew(适用于macOS的软件包管理器),并安装用于https连接的OpenSSL.

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

或者如果您已经安装了Homebrew

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

这篇关于在Rubymine中运行rails时找不到图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆