运行“rails s"时出现分段错误 [英] Segmentation fault when running 'rails s'

查看:38
本文介绍了运行“rails s"时出现分段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在进行捆绑安装后,我运行rails s",它遇到了这个错误.

After doing a bundle install, I run 'rails s' it runs into this error.

$ rails s

/Users/XXXX/.rvm/gems/ruby-1.8.7-p352@r3/gems/json-1.5.3/ext/json/ext/json/ext/parser.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10.8.0]

Abort trap

任何帮助将不胜感激.谢谢!

Any help would be greatly appreciated. Thanks!

推荐答案

  1. rvm gemset 空
  2. rvm 使用 ree@my-gemset
  3. gem 安装包
  4. 捆绑安装

这为我解决了这个问题.必须是针对错误版本的 Ruby(在我的情况下)编译了某些扩展.希望对你有用!

This solved the issue for me. Must be some extension got compiled against the wrong version of Ruby (in my case). Hope it works for you!

如果你没有使用 RVM,我发现这个命令可以卸载所有 gems:

If you are not using RVM, I found this command to uninstall all gems:

  1. '宝石列表 |剪切 -d" " -f1 |xargs gem uninstall -aIx'
  2. gem 安装包
  3. 捆绑安装

这篇关于运行“rails s"时出现分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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