安装了 RVM,现在我的 Rails 服务器无法启动
我昨天启动了 Rails 应用程序,一切正常。 然后今天我决定使用 RVM,因为我意识到我可能需要它。所以我卸载了所有 gem,安装了 RVM,现在有了一个可以工作的(?)RVM。
我重新安装了 gem,现在我的 bundle execrails server
崩溃了
$ 捆绑执行 Rails 服务器
[BUG] rb_gc() 上的跨线程违规
(空)
中止陷阱:6
I不知道我的安装有什么问题,因为没有我可以理解的合理错误。 :(
编辑:Gemfile
I had started the Rails app yesterday and got everything working.
Then today I decided to go with RVM, as I realized I might have need of it. So I uninstalled all gems, installed RVM and have now a working(?) RVM.
I reinstalled the gems and now my bundle exec rails server
crashes
$ bundle exec rails server
[BUG] cross-thread violation on rb_gc()
(null)
Abort trap: 6
I have no idea whats wrong with my installation, as there is no reasonable error' which I could understand. :(
Edit: Gemfile
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试将 gcc-4.2 作为默认 C 编译器添加到 bash 配置文件中:
然后重新安装 rubies。你需要在 4.2 之前安装 XCode 4.1,否则你不会有 gcc-4.2。最简单的方法是卸载4.2,然后安装4.1,然后升级到4.2。
Try adding gcc-4.2 as your default C compiler to your bash profile:
Then reinstall your rubies. You need XCode 4.1 to be installed before 4.2, otherwise you won't have gcc-4.2. The easiest way is to uninstall 4.2, and then install 4.1, then upgrade to 4.2.
查看此解决方案:错误:rb_gc() 上的跨线程冲突
看起来这可能是您的系统和 RVM 之间的 ruby 版本差异造成的问题。还有其他几篇关于如何清理此问题的文章,例如下面的文章,但我不确定哪一篇适合您:
http://blog.ubrio.us/nix/osx-rubygems-and-cross-thread-violations-in-rb_gc/
Check out this solution: Error: cross-thread violation on rb_gc()
It looks like this might be an issue with a ruby version difference between your system and RVM. There are a few other articles out there on how to clean this up, like the one below, but I'm not sure which one will work for you:
http://blog.ubrio.us/nix/osx-rubygems-and-cross-thread-violations-in-rb_gc/
太好了,答案是使用 ruby 1.9.3 而不是 1.9.2 ...
Great, the answer was to use ruby 1.9.3 instead of 1.9.2 ...