Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:54:41+00:00 2026-06-01T14:54:41+00:00

I have an application that is using both the carrierwave & tire gems. The

  • 0

I have an application that is using both the carrierwave & tire gems. The problem that I’m running into is when I try to do rake environment tire:import CLASS=Website FORCE=true --trace I get:

** Invoke environment (first_time)
** Execute environment
** Invoke tire:import (first_time)
** Execute tire:import
[IMPORT] Deleting index 'websites'
[IMPORT] Creating index 'websites' with mapping:
{"website":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}}}}
[IMPORT] Starting import for the 'Website' class
--------------------------------------------------------------------------------
2/2 | 100% rake aborted!##############################################
undefined method `[]' for nil:NilClass
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/carrierwave-0.6.0/lib/carrierwave/orm/activerecord.rb:49:in `block in serializable_hash'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/carrierwave-0.6.0/lib/carrierwave/orm/activerecord.rb:48:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/carrierwave-0.6.0/lib/carrierwave/orm/activerecord.rb:48:in `serializable_hash'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/model/search.rb:270:in `to_hash'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/model/search.rb:164:in `to_indexed_json'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/model/search.rb:290:in `to_indexed_json'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/index.rb:306:in `convert_document_to_json'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/index.rb:76:in `block in bulk_store'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/relation/delegation.rb:6:in `map'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/relation/delegation.rb:6:in `map'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/index.rb:68:in `bulk_store'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/index.rb:113:in `import'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/tasks.rb:83:in `block (3 levels) in <top (required)>'
/Users/Kyle/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/tire-0.4.0/lib/tire/tasks.rb:69:in `block (2 levels) in <top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:203:in `call'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:203:in `block in execute'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/Kyle/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `<main>'
Tasks: TOP => tire:import

There seems to be some kind of conflict between tire and carrier wave. If I remove mount_uploader :screenshot, ScreenshotUploader from my Website model then the rake command will succeed. Any ideas as to the cause of this and what a possible solution might be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:54:43+00:00Added an answer on June 1, 2026 at 2:54 pm

    It looks like there is a conflict with the serializable_hash method which is used by both gems. Tire uses the serializable_hash in their to_hash method which is overwritten by Carrierwave. I hope this helps a bit.

    # tire-0.4.0/lib/tire/model/search.rb:270
    ...
    def to_hash
      self.serializable_hash
    ...
    
    # carrierwave-0.6.0/lib/carrierwave/orm/activerecord.rb:46
    ...
    def serializable_hash(options=nil)
    ...
    

    EDIT

    You could try this (ugly) workaround. Put this into your Website model:

    def to_hash
      self.serializable_hash_copy
    end
    
    def serializable_hash_copy(options = nil)
      options = options.try(:clone) || {}
    
      options[:except] = Array.wrap(options[:except]).map { |n| n.to_s }
      options[:except] |= Array.wrap(self.class.inheritance_column)
    
      super(options)
    end
    

    I hope it works

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that is using both jQuery 1.2.6 and YUI 2.6.0
Here's the core problem: I have a .NET application that is using COM interop
Well I have an application that uses both Objective C & c++ but for
I have an application (Gtk) that has an embedded server (using circuits). Both components
I am writing an application that communicates using sockets. I have a server running
I have an application that's using Oracle.DataAccess to connect. I've already discovered that the
I have an application that is using Windows Authentication and a SqlRoleProvider for user
We have an application that logs using log4net. But we would like to delete
I have a Silverlight application that is using a DataGrid. Inside of that DataGrid
I have a WCF application that is using NetTcpBinding . I want to invoke

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.