RVM Ruby Abort Trap 分段错误,切换目录并进行 rvm use ree 工作

发布于 2024-11-09 19:31:34 字数 864 浏览 10 评论 0原文

我有一个非常非常奇怪的问题。我的rvm设置是ruby企业版(ree 2011-02-18 patchlevel 334),它设置为默认值(rvm use ree --default)。我正在使用 rvm 1.6.13 和 Rails 3 项目。 现在:一旦我尝试运行 Rails s、rails c 或任何 rake 命令,我会得到以下信息:

/Users/florianvallen/.rvm/gems/ree-1.8.7-2011.03@flats/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03

Abort trap

which ruby​​ is: ~/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby

奇怪的是我可以用 rvm use ree 解决这个问题 这告诉我 Using /Users/florianvallen/.rvm/gems/ree-1.8.7-2011.03

之后一切正常。现在,人们可能会认为将 rvm use ree 放在 ~/.profile 中至少可以解决问题,但是当我使用 cd .. 切换目录并输入 Rails 时再次项目,我得到同样的事情,[Bug] Segmentation failure...

有谁知道为什么会这样?

非常感谢任何帮助,谢谢!

I have a very very weird problem. My rvm setup is ruby enterprise edition (ree 2011-02-18 patchlevel 334), it is set to be the default (rvm use ree --default). I am on rvm 1.6.13 and on a rails 3 project.
Now: once i try to run rails s, rails c, or any rake command I get the following:

/Users/florianvallen/.rvm/gems/ree-1.8.7-2011.03@flats/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03

Abort trap

which ruby is: ~/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby

The weird thing is that i can resolve that with rvm use ree
which tells me Using /Users/florianvallen/.rvm/gems/ree-1.8.7-2011.03

After that everything works. Now, one might think that putting rvm use ree in your ~/.profile would at least solve the problem, but when i switch directories with cd .. and enter the rails project again, I get the same thing, [Bug] Segmentation fault...

Does anyone have an idea why this is like that?

Any help is highly appreciated, thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泡沫很甜 2024-11-16 19:31:34

由于安装的宝石不在正确的宝石集中,该问题已得到解决。奇怪的是,切换到该目录时尚未创建 gemset,即使它已由该目录中的 .rvmrc 定义。
再次卸下并安装宝石组已解决该问题。

The issue has been solved as the installed gems werent in the correct gemset. weirdly the gemset has not been created when switching to the directory even though it has been defined by the .rvmrc in that directory.
Removing and installing the gemset again has solved the issue.

故事还在继续 2024-11-16 19:31:34

您确定与 Rails 项目一起安装的 Gems 安装在 ree 下吗? gems 有 C 扩展,这取决于你的 ruby​​ 版本,这可能是你的问题。删除所有宝石并在 rvm ree 下重新捆绑/重新安装它们。

Are you sure the gems you installed with your rails project were installed under ree? The gems have C extensions which are dependent on your ruby version which is probably your problem. Remove all of your gems and rebundle/reinstall them under rvm ree.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文