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

Installation error #20

Open bensullivan opened 12 years ago

bensullivan commented 12 years ago

Hi Josh

I am seeing this error on a fresh install of spree I setup yesterday when I try to install your product import extension (following instructions on the wiki page on GitHub):

ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ rake import_products:install rake aborted! uninitialized constant Spree::ThemeSupport

(See full trace by running task with --trace) ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ rake import_products:install --trace rake aborted! uninitialized constant Spree::ThemeSupport /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/bundler/gems/spree-import-products-2bcca17f140f/lib/import_products_hooks.rb:1:in <top (required)>' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/bundler/gems/spree-import-products-2bcca17f140f/lib/import_products.rb:2:in<top (required)>' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in require' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:inblock (2 levels) in require' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in each' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:inblock in require' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in each' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:inrequire' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/bundler-1.1.3/lib/bundler.rb:119:in require' /home/ubuntu/work/geometry_active_wear/config/application.rb:7:in<top (required)>' /home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' /home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' /home/ubuntu/work/geometry_active_wear/Rakefile:5:in <top (required)>' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:inload' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in load_rakefile' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:501:inraw_load_rakefile' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:82:in block in load_rakefile' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:81:in load_rakefile' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:65:inblock in run' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:inrun' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in <top (required)>' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:inload' /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `

Here are the spree gems I have installed:

spree (1.1.0) spree_api (1.1.0) spree_auth (1.1.0) spree_cmd (1.1.0) spree_core (1.1.0) spree_dash (1.1.0) spree_promo (1.1.0) spree_sample (1.1.0) spree_skrill (1.0.2) spree_usa_epay (1.0.2)

Many thanks

Ben

joshmcarthur commented 12 years ago

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rb in case it's just not being loaded by spree_core. Otherwise, I can look at this tomorrow evening and try and reproduce and fix it myself (I'd do it tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you may have seen from my Github profile, I do a lot of personal projects, and so it's fairly easy (and something I've done before), for me to work evenings and weekends on other stuff. Let me know what you had in mind and I'll see if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course ;-)).

Josh

joshmcarthur commented 12 years ago

Just by the way, if you'd like to talk more about freelance work, please chuck me an email or github message rather than carrying on in this ticket (I think that counts as 'off topic'!)

bensullivan commented 12 years ago

Got it. THanks. Have removed that from original message. How do I send a github message?

Cheers

Ben

joshmcarthur commented 12 years ago

Fair point - I'd forgotten the Github guys have removed the ability to send notifications from the notifications center. Chuck me an email instead - my address is on my profile (https://github.com/joshmcarthur)

bensullivan commented 12 years ago

Ah yep - thanks

On 16 May 2012 14:23, Joshua McArthur < reply@reply.github.com

wrote:

Fair point - I'd forgotten the Github guys have removed the ability to send notifications from the notifications center. Chuck me an email instead - my address is on my profile (https://github.com/joshmcarthur)


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5733295

bensullivan commented 12 years ago

That ruby file doesn't seem to be in my gem set so I don't think the require will fix it?

ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ gem list spree

* LOCAL GEMS *

spree (1.1.0) spree_api (1.1.0) spree_auth (1.1.0) spree_cmd (1.1.0) spree_core (1.1.0) spree_dash (1.1.0) spree_promo (1.1.0) spree_sample (1.1.0) spree_skrill (1.0.2) spree_usa_epay (1.0.2) ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ gem which spree /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear /gems/spree-1.1.0/lib/spree.rb ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ find /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems |grep spree/themes_support/hook ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ find /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems |grep spree/theme_support/hook ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbin case it's just not being loaded by spree_core. Otherwise, I can look at this tomorrow evening and try and reproduce and fix it myself (I'd do it tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you may have seen from my Github profile, I do a lot of personal projects, and so it's fairly easy (and something I've done before), for me to work evenings and weekends on other stuff. Let me know what you had in mind and I'll see if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course ;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127

bensullivan commented 12 years ago

Hi Josh

It appears this hook has been deprecated:

https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an interim workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbin case it's just not being loaded by spree_core. Otherwise, I can look at this tomorrow evening and try and reproduce and fix it myself (I'd do it tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you may have seen from my Github profile, I do a lot of personal projects, and so it's fairly easy (and something I've done before), for me to work evenings and weekends on other stuff. Let me know what you had in mind and I'll see if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course ;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127

joshmcarthur commented 12 years ago

Hi Ben,

It shouldn't be a big deal to fix up. I'll take a look and get the Spree version 1.1 branch fixed up tonight. If you need to just do a load yourself, you can do it straight from the console:

ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:07 AM, bensullivan wrote:

Hi Josh

It appears this hook has been deprecated:

https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an interim workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbin case it's just not being loaded by spree_core. Otherwise, I can look at this tomorrow evening and try and reproduce and fix it myself (I'd do it tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you may have seen from my Github profile, I do a lot of personal projects, and so it's fairly easy (and something I've done before), for me to work evenings and weekends on other stuff. Let me know what you had in mind and I'll see if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course ;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127


Reply to this email directly or view it on GitHub: https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753453

bensullivan commented 12 years ago

Great thanks.

If you need to just do a load yourself, you can do it straight from the

console: ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Really?! Will need to take a look - what does your extension give you over just doing this?

Cheers

On 17 May 2012 08:11, Josh McArthur < reply@reply.github.com

wrote:

Hi Ben,

It shouldn't be a big deal to fix up. I'll take a look and get the Spree version 1.1 branch fixed up tonight. If you need to just do a load yourself, you can do it straight from the console:

ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:07 AM, bensullivan wrote:

Hi Josh

It appears this hook has been deprecated:

https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an interim workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to

https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbincase it's just not being loaded by spree_core. Otherwise, I can look at this tomorrow evening and try and reproduce and fix it myself (I'd do it tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you may have seen from my Github profile, I do a lot of personal projects, and so it's fairly easy (and something I've done before), for me to work evenings and weekends on other stuff. Let me know what you had in mind and I'll see if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course ;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753453


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753521

joshmcarthur commented 12 years ago

My extension provides that 'ProductImport' class ;-) It also runs it through delayed job for large imports, but if you're doing it right from the console there's no point doing that.

https://github.com/joshmcarthur/spree-import-products/blob/master/app/models/product_import.rb

If you're having a problem getting the rails console to start with my extension installed, I'd just open lib/import_products.rb in the installed gem and comment out the require 'import_products_hooks' line until I patch that up for use with Spree 1.1

Josh McArthur

On Thursday, 17 May 2012 at 10:13 AM, bensullivan wrote:

Great thanks.

If you need to just do a load yourself, you can do it straight from the

console: ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Really?! Will need to take a look - what does your extension give you over just doing this?

Cheers

On 17 May 2012 08:11, Josh McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hi Ben,

It shouldn't be a big deal to fix up. I'll take a look and get the Spree version 1.1 branch fixed up tonight. If you need to just do a load yourself, you can do it straight from the console:

ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:07 AM, bensullivan wrote:

Hi Josh

It appears this hook has been deprecated: https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an interim workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to

https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbincase it's just not being loaded by spree_core. Otherwise, I can look at

this tomorrow evening and try and reproduce and fix it myself (I'd do

it

tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you

may

have seen from my Github profile, I do a lot of personal projects, and

so

it's fairly easy (and something I've done before), for me to work

evenings

and weekends on other stuff. Let me know what you had in mind and I'll

see

if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course

;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753453


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753521


Reply to this email directly or view it on GitHub: https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753559

bensullivan commented 12 years ago

OK thanks.

Do you have any specs illustrating how to structure a CSV to import? I noticed some info in the config file referenced in the wiki but it would be good to have some examples to work off…

Cheers

Ben

On 17 May 2012 08:17, Josh McArthur < reply@reply.github.com

wrote:

My extension provides that 'ProductImport' class ;-) It also runs it through delayed job for large imports, but if you're doing it right from the console there's no point doing that.

https://github.com/joshmcarthur/spree-import-products/blob/master/app/models/product_import.rb

If you're having a problem getting the rails console to start with my extension installed, I'd just open lib/import_products.rb in the installed gem and comment out the require 'import_products_hooks' line until I patch that up for use with Spree 1.1

Josh McArthur

On Thursday, 17 May 2012 at 10:13 AM, bensullivan wrote:

Great thanks.

If you need to just do a load yourself, you can do it straight from the

console: ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Really?! Will need to take a look - what does your extension give you over just doing this?

Cheers

On 17 May 2012 08:11, Josh McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hi Ben,

It shouldn't be a big deal to fix up. I'll take a look and get the Spree version 1.1 branch fixed up tonight. If you need to just do a load yourself, you can do it straight from the console:

ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:07 AM, bensullivan wrote:

Hi Josh

It appears this hook has been deprecated:

https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an interim workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to

https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbincaseit's just not being loaded by spree_core. Otherwise, I can look at

this tomorrow evening and try and reproduce and fix it myself (I'd do

it

tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as you

may

have seen from my Github profile, I do a lot of personal projects, and

so

it's fairly easy (and something I've done before), for me to work

evenings

and weekends on other stuff. Let me know what you had in mind and I'll

see

if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of course

;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753453


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753521


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753559


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753643

joshmcarthur commented 12 years ago

Hey Ben,

If you go on Github, there is a branch called '1_1_x_merge' that has a spec folder with some example CSV files you can base things off. One thing to note with your problem is that you need to be using the 1_1_x branch to install the gem - I'm keeping master back on an earlier Spree version for now.

In your Gemfile at the moment, you probably have: gem 'spree_import_products'

try changing it to:

gem 'spree_import_products', :git => 'https://joshmcarthur@github.com/joshmcarthur/spree-import-products.git', :branch => '1_1_x'

…and see how you go.

The reason that the specs aren't in the main 1_1_x branch yet is that I was seeing a single failing spec on that branch - it's something to do with Delayed Job not working off jobs in the tests, but I didn't want to merge until all the tests pass. Using the 1_1_x branch should fix the problem with ThemeSupport though - it uses Deface overrides.

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:20 AM, bensullivan wrote:

OK thanks.

Do you have any specs illustrating how to structure a CSV to import? I noticed some info in the config file referenced in the wiki but it would be good to have some examples to work off…

Cheers

Ben

On 17 May 2012 08:17, Josh McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

My extension provides that 'ProductImport' class ;-) It also runs it through delayed job for large imports, but if you're doing it right from the console there's no point doing that.

https://github.com/joshmcarthur/spree-import-products/blob/master/app/models/product_import.rb

If you're having a problem getting the rails console to start with my extension installed, I'd just open lib/import_products.rb in the installed gem and comment out the require 'import_products_hooks' line until I patch that up for use with Spree 1.1

Josh McArthur

On Thursday, 17 May 2012 at 10:13 AM, bensullivan wrote:

Great thanks.

If you need to just do a load yourself, you can do it straight from the

console: ProductImport.create(:data_file =>

File.open(PATH_TO_FILE)).import_data!

Really?! Will need to take a look - what does your extension give you over just doing this?

Cheers

On 17 May 2012 08:11, Josh McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hi Ben,

It shouldn't be a big deal to fix up. I'll take a look and get the Spree version 1.1 branch fixed up tonight. If you need to just do a load yourself, you can do it straight from the console:

ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:07 AM, bensullivan wrote:

Hi Josh

It appears this hook has been deprecated: https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an

interim

workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support

them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to

https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbincaseit's just not being loaded by spree_core. Otherwise, I can look at

this tomorrow evening and try and reproduce and fix it myself (I'd

do

it

tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as

you

may

have seen from my Github profile, I do a lot of personal projects,

and

so

it's fairly easy (and something I've done before), for me to work

evenings

and weekends on other stuff. Let me know what you had in mind and

I'll

see

if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of

course

;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753453


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753521


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753559


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753643


Reply to this email directly or view it on GitHub: https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753681

bensullivan commented 12 years ago

OK thanks

On 17 May 2012 08:27, Josh McArthur < reply@reply.github.com

wrote:

Hey Ben,

If you go on Github, there is a branch called '1_1_x_merge' that has a spec folder with some example CSV files you can base things off. One thing to note with your problem is that you need to be using the 1_1_x branch to install the gem - I'm keeping master back on an earlier Spree version for now.

In your Gemfile at the moment, you probably have: gem 'spree_import_products'

try changing it to:

gem 'spree_import_products', :git => ' https://joshmcarthur@github.com/joshmcarthur/spree-import-products.git', :branch => '1_1_x'

…and see how you go.

The reason that the specs aren't in the main 1_1_x branch yet is that I was seeing a single failing spec on that branch - it's something to do with Delayed Job not working off jobs in the tests, but I didn't want to merge until all the tests pass. Using the 1_1_x branch should fix the problem with ThemeSupport though - it uses Deface overrides.

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:20 AM, bensullivan wrote:

OK thanks.

Do you have any specs illustrating how to structure a CSV to import? I noticed some info in the config file referenced in the wiki but it would be good to have some examples to work off…

Cheers

Ben

On 17 May 2012 08:17, Josh McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

My extension provides that 'ProductImport' class ;-) It also runs it through delayed job for large imports, but if you're doing it right from the console there's no point doing that.

https://github.com/joshmcarthur/spree-import-products/blob/master/app/models/product_import.rb

If you're having a problem getting the rails console to start with my extension installed, I'd just open lib/import_products.rb in the installed gem and comment out the require 'import_products_hooks' line until I patch that up for use with Spree 1.1

Josh McArthur

On Thursday, 17 May 2012 at 10:13 AM, bensullivan wrote:

Great thanks.

If you need to just do a load yourself, you can do it straight from the

console: ProductImport.create(:data_file =>

File.open(PATH_TO_FILE)).import_data!

Really?! Will need to take a look - what does your extension give you over just doing this?

Cheers

On 17 May 2012 08:11, Josh McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hi Ben,

It shouldn't be a big deal to fix up. I'll take a look and get the Spree version 1.1 branch fixed up tonight. If you need to just do a load yourself, you can do it straight from the console:

ProductImport.create(:data_file => File.open(PATH_TO_FILE)).import_data!

Cheers,

Josh

Josh McArthur

On Thursday, 17 May 2012 at 10:07 AM, bensullivan wrote:

Hi Josh

It appears this hook has been deprecated:

https://groups.google.com/forum/?fromgroups#!topic/spree-user/N0cT5Yb8UZM

Do you think it's a big job for you to fix this up?

Are there any other ways you might recommend me automating the population of the initial small set of product/variant/option types as an

interim

workaround?

Cheers

Ben

On 16 May 2012 12:08, Joshua McArthur < reply@reply.github.com (mailto:reply@reply.github.com)

wrote:

Hey Ben,

I've not seen that error before, but I don't myself use the latest versions of Spree (but I have been patching this gem to support

them).

If you're happy to have a muddle with the source, you could try adding a require 'spree/theme_support/hook' to

https://github.com/joshmcarthur/spree-import-products/blob/master/lib/import_products_hooks.rbincaseit'sjust not being loaded by spree_core. Otherwise, I can look at

this tomorrow evening and try and reproduce and fix it myself (I'd

do

it

tonight, but I'm graduating University :-)).

In terms of freelance work, it largely depends on the type of work and how flexible it is. I do have a full time job during the week, but as

you

may

have seen from my Github profile, I do a lot of personal projects,

and

so

it's fairly easy (and something I've done before), for me to work

evenings

and weekends on other stuff. Let me know what you had in mind and

I'll

see

if it's something I can fit in.

Cheers, good luck with the bugfixing, and I'll get back to you once I've tried to reproduce this myself (Unless you have more luck, of

course

;-)).

Josh


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5732127


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753453


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753521


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753559


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753643


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753681


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5753817

joshmcarthur commented 12 years ago

Hey Ben,

As far as I can see, the issue that you seem to be running into was that you were using the gem installed from Rubygems, which I have kept around for backwards compatibility with Spree 0.50.x - that's the one that was requiring Spree::ThemeSupport.

I believe that using the version of Spree Import Products installed from the 1_1_x branch here on Github should fix this issue for you, because it uses Deface overrides to insert the admin tab. Have you tried putting gem 'spree_import_products', :git => 'https://joshmcarthur@github.com/joshmcarthur/spree-import-products.git', :branch => '1_1_x' in your Gemfile instead of gem 'spree_import_products'?

bensullivan commented 12 years ago

Hi Josh

With the Gemfile change I seem to be getting a it further now but ultimately problems (see below). I'm still following install instructions on the wiki and the messages I get from the command line - not sure if I'm getting the order wrong…

Appears to be a missing script in the delayed_job gem - have I got the right version?

Cheers

Ben

ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ rake import_products:install Copied migration 20120518073406_create_product_imports.import_products.rb from import_products Copied migration 20120518073407_rename_product_imports_table_to_spree_product_imports.import_products.rb from import_products INFO: Mirroring assets from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/bundler/gems/spree-import-products-25bc3ff4f629/lib/tasks/../../db to /home/ubuntu/work/geometry_active_wear/db NOTE: This extensions uses delayed job - you need to generate additional migrations for this gem by executing `rails generate delayed_job:active_record' ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ rake db:migrate rake aborted! cannot load such file -- delayed/backend/active_record

Tasks: TOP => db:migrate => environment (See full trace by running task with --trace) ubuntu@ip-10-204-215-97:~/work/geometry_active_wear$ rails generate delayed_job:active_record /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in require': cannot load such file -- delayed/backend/active_record (LoadError) from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in block in require' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in load_dependency' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in require' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/delayed_job-3.0.2/lib/delayed/worker.rb:56:in backend=' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/bundler/gems/spree-import-products-25bc3ff4f629/config/initializers/delayed_job.rb:1:in <top (required)>' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in load' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in block in load' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in load_dependency' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in load' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/engine.rb:588:in block (2 levels) in <class:Engine>' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/engine.rb:587:in each' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/engine.rb:587:in block in <class:Engine>' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/initializable.rb:30:in instance_exec' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/initializable.rb:30:in run' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/initializable.rb:55:in block in run_initializers' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/initializable.rb:54:in each' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/initializable.rb:54:in run_initializers' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/application.rb:136:in initialize!' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in method_missing' from /home/ubuntu/work/geometry_active_wear/config/environment.rb:5:in <top (required)>' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in require' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in block in require' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in load_dependency' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in require' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/application.rb:103:in require_environment!' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p194@geometry_active_wear/gems/railties-3.2.3/lib/rails/commands.rb:25:in <top (required)>' from script/rails:6:inrequire' from script/rails:6:in `

'

On 18 May 2012 07:56, Josh McArthur < reply@reply.github.com

wrote:

Hey Ben,

As far as I can see, the issue that you seem to be running into was that you were using the gem installed from Rubygems, which I have kept around for backwards compatibility with Spree 0.50.x - that's the one that was requiring Spree::ThemeSupport.

I believe that using the version of Spree Import Products installed from the 1_1_x branch here on Github should fix this issue for you, because it uses Deface overrides to insert the admin tab. Have you tried putting gem 'spree_import_products', :git => ' https://joshmcarthur@github.com/joshmcarthur/spree-import-products.git', :branch => '1_1_x' in your Gemfile instead of gem 'spree_import_products'?


Reply to this email directly or view it on GitHub:

https://github.com/joshmcarthur/spree-import-products/issues/20#issuecomment-5775230

zuch commented 12 years ago

@bensullivan Try add the following line to your Gemfile

gem 'delayed_job_active_record'

I can't vouch that it works but came across that issue before.

@joshmcarthur When I added

gem 'spree_import_products', :git => 'https://joshmcarthur@github.com/joshmcarthur/spree-import-products.git', :branch => '1_1_x'
to my Gemfiile and enter
bundle update

I get the following output

Could not find gem 'spree_import_products (>= 0) x86-mingw32' in https://joshmcarthur@github.com/joshmcarthur/spree-import-products.git (at 1_1_x).
Source does not contain any versions of 'spree_import_products (>= 0) x86-mingw32'

Not sure if this is because you are currently working on the 1_1_x branch, would u know what this issue is?