0

I tried upgrading a Rails application to Ruby 2.3.0 and Rails 4.2.6. Everything works in development. But when trying the production env. it crashes. When running rake assets:precompile the application throws an error on gems that is initialised with a block.

For example this error is thrown:

/Users/danielronnkvist/dev/sigbit/carrierwave_backgrounder/lib/carrierwave_backgrounder.rb:11: [BUG] Segmentation fault at 0x00000000000010
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]

And the initialising block is:

CarrierWave::Backgrounder.configure do |c|
  c.backend :delayed_job, queue: :carrierwave
end

And that block is yielded on line 11, like this:

...
module CarrierWave
  module Backgrounder
    include Support::Backends

    def self.configure
      yield self
      ...

I fixed the error in this file by pasting the block directly into the gem. But the error still occurs on block initialisations.

Any ideas what is going wrong? The crash also says You may have encountered a bug in the Ruby interpreter or extension libraries., is it a Ruby 2.3.0 issue? Or Rails?

trevligheten
  • 306
  • 2
  • 13
  • is this error seen always or intermittently? whats your carrierwave version? – uday Mar 17 '16 at 14:15
  • @uDaY: Allways, even when I try to deploy to Heroku. My Carrierwave version is 0.10.0. But the problem lays with Ruby I think. – trevligheten Mar 17 '16 at 15:31

1 Answers1

0

Ruby 2.3.1 change log shows two segmentation fault fixes (http://svn.ruby-lang.org/repos/ruby/tags/v2_3_1/ChangeLog). Upgrading from 2.3.0 to 2.3.1 seems to have resolved the segmentation fault bug I was seeing.

Cleverlemming
  • 1,310
  • 1
  • 8
  • 10