Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

private method `split' called for #<Mime::Type:0x226f618>

#2784

Following error happens with Rack gem installed and vendored 2.3.2 rails:

/!\ FAILSAFE /!\ 06/08/2009 17:48 PM Status: 500 Internal Server Error private method split' called for #<Mime::Type:0x226f618>

/Users/ian/Projects/app/vendor/rails/actionpack/lib/action_controller/mime_type.rb:206:in `method_missing'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:51:in `media_type'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:117:in `parseable_data?'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:138:in `POST'

Removing the Rack gem works, only problem is that rspec-rails needs the gem. Not sure where rails is getting rack from if it's not installed, is it bundled?

Reported by ihunter · June 9th, 2009 @ 01:54 AM

State: duplicate
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. ihunter
  2. Bodaniel Jeanes
    Bodaniel Jeanes

    I am getting this as well. However, I get it when performing XHR requests even for non-vendored Rails on 2.3.2

    +1

    June 10th, 2009 @ 06:08 AM

  3. ian (at cocodot)
    ian (at cocodot)

    I found a temporary workaround, not sure if it's correct but it works in my case:

    https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets...

    Just add:

    module Mime

    class Type

    def split(*args)
      to_s.split(*args)
    end
    

    end

    end

    to a config/initializers class file.

    HTH, ian

    June 10th, 2009 @ 08:41 AM

  4. amanfredi (at gmail)
  5. qoobaa
    qoobaa

    I think it's the same problem as in #2658. I wrote a failing test that passes on edge, so it seems to be already fixed. I suggest including the test to avoid further problems.

    June 29th, 2009 @ 08:20 PM

  6. laserlemon
    laserlemon

    I prefer:

    class Mime::Type
      delegate :split, :to => :to_s
    end
    

    July 1st, 2009 @ 01:11 AM

  7. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • State changed from new to duplicate

    Duplicate of #2658

    January 20th, 2010 @ 05:42 PM