autotelik / datashift

Full Excel/CSV Import/Export facilities for Rails
http://www.autotelik.co.uk
Other
136 stars 75 forks source link

Uninitialized constant Logging (NameError) #29

Closed ostraperlera closed 9 years ago

ostraperlera commented 9 years ago

Hi there, I'm running into an error every time I try to generate a template with bundle exec thor datashift:generate:excel --model Spree:Product --result /home/devs/excel.xls --assoc.

devs@barakah:~/artilujos$ bundle exec thor datashift:generate:excel --model Spree:Product --result /home/devs/excel.xls --assoc
/home/devs/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/durable_decorator-0.2.2/lib/durable_decorator/util.rb:46:in `logger': uninitialized constant Logging (NameError)
    from /home/devs/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/durable_decorator-0.2.2/lib/durable_decorator/validator.rb:34:in `handle_soft_fault'
    from /home/devs/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/durable_decorator-0.2.2/lib/durable_decorator/validator.rb:22:in `validate_decoration_meta'

I've seen a few similar issues reported and tried many things: adding 'include DataShift::Logging' and 'require 'logging'' to the util.rb file, fiddling with different versions and making the changes suggested in this thread https://github.com/autotelik/datashift_spree/issues/1

I've run out of ideas and so I'd appreciate if you could point me in the right direction.

Gems are listed like this, at the bottom of my gemfile:

gem 'datashift', :git => 'http://github.com/autotelik/datashift'
gem 'datashift_spree', :git => 'http://github.com/autotelik/datashift_spree'

Thanks!

autotelik commented 9 years ago

Hi .. from the stack trace it looks like the issue is actually within durable_decorator. Looking at the file mentioned there is a call to Logging on line 46 : https://github.com/jumph4x/durable_decorator/blob/master/lib/durable_decorator/util.rb

I'm not aware of this being part of datashift so perhaps you have included it separately in your Gemfile ?

ostraperlera commented 9 years ago

Yeah, I just reached the same conclusion myself. durable_decorator was required by spree_drop_ship, disabling it solved the problem for now. Thanks for your time :)