运行 rails S 时出现分段错误(无法编译 nokogiri) [英] Segmentation fault when I run rails S (cant compile nokogiri)
问题描述
我已经在配置地狱中待了两天,我已经尝试了 Stack Overflow 上的几乎所有内容来修复它.我觉得我尝试过的一些东西可能让事情变得更糟.我使用 RVM,然后我尝试使用 rbenv,现在我又回到使用 RVM.我不确定是否有 rbenv 的残余导致了这种情况或什么,但我按照说明将其完全删除.
I have been in configuration hell for two days and I have tried just about everything on Stack Overflow to fix it. I feel like some of the stuff I have tried may have made things worse. I was using RVM, then I tried using rbenv, and now I am back to using RVM again. I am not sure if there are remnants of rbenv that are causing this or what but I followed the instructions to remove it completely.
我目前遇到的错误在这里:
The error I am getting currently is here:
https://gist.github.com/EvanTedesco/d4288cfb1f8dfc5a1e03
ruby -v:
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.4.0]
rails -v:
Rails 3.2.19
xcode-select -p:
xcode-select -p:
/Library/Developer/CommandLineTools
宝石环境:
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.3
- RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [x86_64-darwin14.0]
- INSTALLATION DIRECTORY: /Users/acumendigital/.rvm/gems/ruby-2.1.5
- RUBY EXECUTABLE: /Users/acumendigital/.rvm/rubies/ruby-2.1.5/bin/ruby
- EXECUTABLE DIRECTORY: /Users/acumendigital/.rvm/gems/ruby-2.1.5/bin
- SPEC CACHE DIRECTORY: /Users/acumendigital/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-14
- GEM PATHS:
- /Users/acumendigital/.rvm/gems/ruby-2.1.5
- /Users/acumendigital/.rvm/gems/ruby-2.1.5@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["https://rubygems.org/", "http://rubygems.org"]
- REMOTE SOURCES:
- https://rubygems.org/
- http://rubygems.org
- SHELL PATH:
- /Users/acumendigital/.rvm/gems/ruby-2.1.5/bin
- /Users/acumendigital/.rvm/gems/ruby-2.1.5@global/bin
- /Users/acumendigital/.rvm/rubies/ruby-2.1.5/bin
- /usr/local/bin
- /usr/bin
- /bin
- /user/sbin
- /sbin
- /user/local/bin
- /usr/local/git/bin
- /Users/acumendigital/.gem/ruby/1.8/bin
- /opt/nginx/sbin
- /Users/acumendigital/.rvm/bin
房车信息:
ruby-1.9.3-p547@ums:
system:
uname: "Darwin Evans-MacBook-Pro.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64"
system: "osx/10.9/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)"
zsh: "/bin/zsh => zsh 5.0.2 (x86_64-apple-darwin13.0)"
rvm:
version: "rvm 1.26.3 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "8 minutes 33 seconds ago"
path: "/Users/acumendigital/.rvm"
ruby:
interpreter: "ruby"
version: "1.9.3p547"
date: "2014-05-14"
platform: "x86_64-darwin13.4.0"
patchlevel: "2014-05-14 revision 45962"
full_version: "ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.4.0]"
homes:
gem: "/Users/acumendigital/.rvm/gems/ruby-1.9.3-p547@ums"
ruby: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547"
binaries:
ruby: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547/bin/ruby"
irb: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547/bin/irb"
gem: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547/bin/gem"
rake: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547/bin/rake"
environment:
PATH: "/Users/acumendigital/.rvm/gems/ruby-1.9.3-p547@ums/bin:/Users/acumendigital/.rvm/gems/ruby-1.9.3-p547@global/bin:/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547/bin:/Users/acumendigital/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/user/sbin:/sbin:/user/local/bin:/usr/local/git/bin:/Users/acumendigital/.gem/ruby/1.8/bin:/opt/nginx/sbin"
GEM_HOME: "/Users/acumendigital/.rvm/gems/ruby-1.9.3-p547@ums"
GEM_PATH: "/Users/acumendigital/.rvm/gems/ruby-1.9.3-p547@ums:/Users/acumendigital/.rvm/gems/ruby-1.9.3-p547@global"
MY_RUBY_HOME: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547"
IRBRC: "/Users/acumendigital/.rvm/rubies/ruby-1.9.3-p547/.irbrc"
RUBYOPT: ""
gemset: "ums"
老实说,我不知道还能尝试什么.非常感谢任何帮助.
Honestly I have no Idea what else to try. Any help is appreciated greatly.
推荐答案
所以我尝试了 tin man 提供的步骤,但仍然出现 seg 错误.我终于接触到了一位高级开发人员,他确定问题是我的 open ssl 配置不正确.我用
So I tried the steps provided by the tin man and I was still getting the seg fault. I finally got access to a senior dev and he determined that the problem was that my open ssl was not configured properly. I fixed the issue with
brew link --force openssl
然后我删除并重新安装了宝石和红宝石.现在一切都很好.感谢所有花时间回答我的问题的人,我希望这对其他人有所帮助.特别感谢 Tin Man 花时间写出详细的回复.
then I removed and reinstalled the gemsets and rubies. All good now. Thank you to everyone who took time to answer my question and I hope this helps someone else. Special thanks to the Tin Man for taking the time to write that detailed response.
我还注意到,当我捆绑时,我得到了
I also noticed that when I was bundling that I was getting
Your bundle is complete!
It was installed into ./vendor/bundle
所以我删除了 ./vendor/bundle with
so I deleted ./vendor/bundle with
rm -rf ./vendor/bundle
并重新捆绑.
这篇关于运行 rails S 时出现分段错误(无法编译 nokogiri)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!