excon/connection.rb 连接函数中的 Ruby on Rails 段错误

发布于 2024-10-31 03:29:56 字数 1553 浏览 1 评论 0原文

我正在使用 Carrierwave 和 Rails 3.0.4。当我将文件本地存储在服务器上时,我的大项目一切正常,但当我切换到使用 Amazon s3 时,一切都会崩溃。也就是说,我得到了这个错误(只是一个非常大的跟踪的结尾):

/Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:252: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]

-- control frame ----------
c:0099 p:---- s:0529 b:0529 l:000528 d:000528 CFUNC  :connect
c:0098 p:0192 s:0526 b:0526 l:000525 d:000525 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:252
c:0097 p:0333 s:0519 b:0519 l:000518 d:000518 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:231
c:0096 p:0030 s:0513 b:0510 l:000509 d:000509 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:268
c:0095 p:0618 s:0507 b:0507 l:000506 d:000506 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:148
c:0094 p:0100 s:0491 b:0491 l:000490 d:000490 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/core/connection.rb:20
c:0093 p:0106 s:0483 b:0483 l:000482 d:000482 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/storage/aws.rb:323

更奇怪的是,我已经成功地创建了另外两个项目,它们使用相同的代码、相同的 gem 和相同版本的 Ruby (1.9.2- p136)与 Amazon s3 配合得很好。这些项目之间的唯一区别是 SQLite 与 MySQL 以及不同的内部、看似不相关的代码。

此处是我在 Carrierwave Google 群组中发布的帖子。

感谢您的任何帮助。

I am using Carrierwave with Rails 3.0.4. Everything works fine on my big project when I am storing the files locally on the server, but when I switch over to use Amazon s3 things fall apart. Namely I get this error (just the end of a very large trace):

/Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:252: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]

-- control frame ----------
c:0099 p:---- s:0529 b:0529 l:000528 d:000528 CFUNC  :connect
c:0098 p:0192 s:0526 b:0526 l:000525 d:000525 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:252
c:0097 p:0333 s:0519 b:0519 l:000518 d:000518 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:231
c:0096 p:0030 s:0513 b:0510 l:000509 d:000509 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:268
c:0095 p:0618 s:0507 b:0507 l:000506 d:000506 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.1/lib/excon/connection.rb:148
c:0094 p:0100 s:0491 b:0491 l:000490 d:000490 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/core/connection.rb:20
c:0093 p:0106 s:0483 b:0483 l:000482 d:000482 METHOD /Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/storage/aws.rb:323

What makes it even weirder is that I have successfully made two other projects that use the same code and the same gems and the same version of Ruby (1.9.2-p136) that work just fine with Amazon s3. The only difference between the projects is SQLite vs MySQL along with different internal, seemingly unrelated code.

Here is a post I made to the Carrierwave google group.

Thanks for any help.

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

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

发布评论

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

评论(1

音盲 2024-11-07 03:29:56

解决了。问题出在 mysql gem 上。请改用 ruby​​-mysql 或 mysql2。这会导致 Linux 系统上的管道损坏,并且很容易被误诊为 openssl、载波或雾问题。

Solved. The problem was the mysql gem. Use ruby-mysql or mysql2 instead. This causes a broken pipe on Linux systems and can easily be misdiagnosed as an openssl, carrierwave, or fog problem.

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