joshmcarthur / spree-import-products

A Spree extension to allow users to batch upload Products from a CSV file using Delayed Job
http://spreecommerce.com/extensions/103-import-products
BSD 3-Clause "New" or "Revised" License
80 stars 99 forks source link

uninitialized constant ImportProducts::Engine::UserMailer (NameError) #8

Closed JupiterJones closed 12 years ago

JupiterJones commented 12 years ago

I'm installing a fresh 0.70.1 spree and want to include import-products however i'm hitting the following error. I'm still new to Spree (and to some extent Ruby) so any advice you can offer would be much appreciated.

jupiter$ rails g spree:site /gem-source/spree-import-products/lib/import_products.rb:14:in `activate': uninitialized constant ImportProducts::Engine::UserMailer (NameError) (stack cut for brevity)

joshmcarthur commented 12 years ago

Hi @JupiterJones,

UserMailer is a part of Spree (at least, it was last time I checked). You could try removing spree-import-products from your Gemfile, running rails g spree:site, and then re-adding the gem. If this still doesn't work, then it's possible that the Spree developers have moved or renamed this mailer.

Let me know how you get on with this anyway - if it doesn't work, I'll pull down 0.70.1 and see if I can fix up the way I call UserMailer to work.

JupiterJones commented 12 years ago

This was my own stupidity so I'm closing the issue :)

thebyrd commented 12 years ago

I'm running into the same issue & I'm at a similar level with Spree as JupiterJones.

@JupiterJones Can you expand on how you fixed it? @joshmcarthur Did you ever look into this after Spree 1.0 came out?

joshmcarthur commented 12 years ago

Hi @davidbyrd11 - yes, and it should also be fixed in the 1.x branches in this repo - basically it is now called Spree::UserMailer instead of UserMailer (which is why that error happens). Try using the following line in your Gemfile:

gem 'import_products', :git => 'git://github.com/joshmcarthur/spree-import-products.git', :branch => '1_1_x' (assuming your on the latest version of Spree)

This should bundle in the latest release which should work for you. Let me know if it doesn't though and I'll do my best to help out.

thebyrd commented 12 years ago

Yep, I got it now. Sorry about that. I hadn't seen your other post until after I posted this.