Rails 返回:[BUG] 分段错误 [英] Rails s return: [BUG] Segmentation fault

查看:38
本文介绍了Rails 返回:[BUG] 分段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行 rails s,我得到:

If I run rails s, I get:

/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/pg-0.13.2/lib/pg_ext.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

Abort trap: 6

版本:

rails -v
Rails 3.2.1
ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]

如果我使用 1.9.3,为什么在错误消息中提到了 ruby​​ 版本 1.8.7?

Why is in the error message mentioned the ruby version 1.8.7 if I use 1.9.3?

推荐答案

当您最初安装 pg gem 时,它看起来像是针对 Ruby 1.8.7 编译的.只需运行 gem uninstall pg;gem install pg 应该针对 Ruby 1.9.3 重新编译它.

It looks like your pg gem compiled against Ruby 1.8.7 when you originally installed it. Simply running gem uninstall pg; gem install pg should recompile it against Ruby 1.9.3.

如果您还没有,我建议您使用 RVM 来避免此类问题.

If you're not already, I would recommend using RVM to avoid this kind of problem.

这篇关于Rails 返回:[BUG] 分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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