Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `get_spree_class' #4

Closed
jetsgit opened this issue Oct 21, 2012 · 4 comments
Closed

undefined method `get_spree_class' #4

jetsgit opened this issue Oct 21, 2012 · 4 comments

Comments

@jetsgit
Copy link
Contributor

jetsgit commented Oct 21, 2012

Thanks for update! I am now using that.

The below

bundle exec thor datashift:spree:images -i /home/jet/AceLeatherGoods/Ace_Primary_Web_Photos/ -s

...is now generating this error:

datashift_spree-d5ba969c8c64/lib/thor/spree/products_images.thor:128:in images': undefined methodget_spree_class' for DataShift::SpreeHelper:Module (NoMethodError)

@jetsgit
Copy link
Contributor Author

jetsgit commented Oct 23, 2012

Hi Tom,

Thanks for update, all most working at this point!

I am cloning from github:

Using datashift (0.10.2) from git://github.com/autotelik/datashift.git (at master)
Using datashift_spree (0.2.1) from git://github.com/autotelik/datashift_spree.git (at master)

I am now using ruby 1.9.3-p194 and Spree 1.1.2

"get_spree_class" error is fixed.

I am getting the following output from:

jet@chinook:~/RailsApps/spree/aceleathergoods$ bundle exec thor datashift:spree:images -i /home/jet/AceLeatherGoods/Ace_Primary_Web_Photos/ -s 

Below is output:

Using sku for lookup
Found 161 files - splitting names on delimiter [ ]
try to find record where sku == AC102_soft-acc-2zip-coinpurse-keychain-main

Nothing is imported, all files copied to MissingAttachmentRecords

is delimiter [ ] actually supposed to show current delimiter used?
If so, looks like it is not set to '_" which I was hoping for.

Tried passing in

 -s '_' but that did not work.

Seems this used to run perfect in version I was using in July.
Am I doing something wrong in the invocation?

Thanks!

Jet

@autotelik
Copy link
Owner

Hi

yeah sorry it's all a bit broken .. think it's nearly back together

basically what I've done is from the spree image loader,
created a generic paperclip loader that can be used to create any attachment and attach to any class

There have also been issues caused by Spree core moving stuff around.

in versions > 1.1 images are now on Variantrather than Product

it means that the spree image stuff has been rewritten to use this new paperclip loader

there are many more options now, to set the delimiter it's --split_file_name_on _

-s is to lookup based on sku

Cheers
tom

p.s  should work with Excel now in all Rubies, no reliance on jruby any more


From: Jerrold Thompson notifications@github.com
To: autotelik/datashift_spree datashift_spree@noreply.github.com
Sent: Tuesday, 23 October 2012, 2:40
Subject: Re: [datashift_spree] undefined method `get_spree_class' (#4)

Hi Tom,
Thanks for update, all most working at this point!
I am cloning from github:
Using datashift (0.10.2) from git://github.com/autotelik/datashift.git (at master)
Using datashift_spree (0.2.1) from git://github.com/autotelik/datashift_spree.git (at master)
I am now using ruby 1.9.3-p194 and Spree 1.1.2
"get_spree_class" error is fixed.
I am getting the following output from:
jet@chinook:~/RailsApps/spree/aceleathergoods$ bundle exec thor datashift:spree:images -i /home/jet/AceLeatherGoods/Ace_Primary_Web_Photos/ -s
Below is output:
Using sku for lookup
Found 161 files - splitting names on delimiter [ ]
try to find record where sku == AC102_soft-acc-2zip-coinpurse-keychain-main
Nothing is imported, all files copied to MissingAttachmentRecords
is delimiter [ ] actually supposed to show current delimiter used?
If so, looks like it is not set to '" which I was hoping for.
Tried passing in
-s '
' but that did not work.
Seems this used to run perfect in version I was using in July.
Am I doing something wrong in the invocation?
Thanks!
Jet

Reply to this email directly or view it on GitHub.

@jetsgit
Copy link
Contributor Author

jetsgit commented Oct 23, 2012

Hi Tom,

wow, that's really cool about not having to use jruby to use excel stuff!
Rather big problem to get that to work, believe a hack had to be made
in regard to 'expect'.

Pulled in from github after receiving this email/posting and
am still getting this error using '-s' for sku lookup:

 try to find record where sku ==  LH62_organizer-whidbey-main

...and this error for '--split_file_name_on _' :

: SELECT  "spree_variants".* FROM "spree_variants"  WHERE 

(lower(name) = 'soft-acc-2zip-coinpurse-keychain-main') LIMIT 1>
#<ActiveRecord::StatementInvalid: PG::Error: ERROR: column "name" does
not exist
LINE 1: ...e_variants".* FROM "spree_variants" WHERE (lower(name) = '_...
^
: SELECT "spree_variants".* FROM "spree_variants" WHERE (lower(name) =
'_ac102') LIMIT 1>
#<ActiveRecord::StatementInvalid: PG::Error: ERROR: column "name" does
not exist
LINE 1: ...e_variants".* FROM "spree_variants" WHERE (lower(name) = 'a...

Seems to be inconsistency in the 2 error examples above, which is curious.

Could you let me know when you have pushed up the revision?

Thanks!

Looking forward to using the new version.

Cheers,

Jet

On 10/23/2012 03:06 AM, tom statter wrote:

Hi

yeah sorry it's all a bit broken .. think it's nearly back together

basically what I've done is from the spree image loader,
created a generic paperclip loader that can be used to create any
attachment and attach to any class

There have also been issues caused by Spree core moving stuff around.

in versions > 1.1 images are now on Variantrather than Product

it means that the spree image stuff has been rewritten to use this new
paperclip loader

there are many more options now, to set the delimiter it's
--split_file_name_on _

-s is to lookup based on sku

Cheers
tom

p.s should work with Excel now in all Rubies, no reliance on jruby
any more


From: Jerrold Thompson notifications@github.com
To: autotelik/datashift_spree datashift_spree@noreply.github.com
Sent: Tuesday, 23 October 2012, 2:40
Subject: Re: [datashift_spree] undefined method `get_spree_class' (#4)

Hi Tom,
Thanks for update, all most working at this point!
I am cloning from github:
Using datashift (0.10.2) from git://github.com/autotelik/datashift.git
(at master)
Using datashift_spree (0.2.1) from
git://github.com/autotelik/datashift_spree.git (at master)
I am now using ruby 1.9.3-p194 and Spree 1.1.2
"get_spree_class" error is fixed.
I am getting the following output from:
jet@chinook:~/RailsApps/spree/aceleathergoods$ bundle exec thor
datashift:spree:images -i
/home/jet/AceLeatherGoods/Ace_Primary_Web_Photos/ -s
Below is output:
Using sku for lookup
Found 161 files - splitting names on delimiter [ ]
try to find record where sku ==
AC102_soft-acc-2zip-coinpurse-keychain-main
Nothing is imported, all files copied to MissingAttachmentRecords
is delimiter [ ] actually supposed to show current delimiter used?
If so, looks like it is not set to '" which I was hoping for.
Tried passing in
-s '
' but that did not work.
Seems this used to run perfect in version I was using in July.
Am I doing something wrong in the invocation?
Thanks!
Jet

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#4 (comment).

@autotelik
Copy link
Owner

hey, man ..  sorry about the timing, just as you need it I break everything !

I wrote a wrapper over Apache POI and the standard Ruby spreadsheet gem
so depending on context uses either one

ok, so this time I'm hopeful it's all good

new specs and everything passing and just tested the thor product and images clis and

worked ok for me

there is a constraint now that image lookup is only available via sku not name yet

since they have moved Images to Variant thats the class I'm doing the lookup for,
so need to add a scope to allow lookup of  a variant via the product name

thats next on the list, imprivign the querying interface

really hope the latest gems  work ok for you

Cheers
tom


From: Jerrold Thompson notifications@github.com
To: autotelik/datashift_spree datashift_spree@noreply.github.com
Cc: tom statter github@autotelik.co.uk
Sent: Tuesday, 23 October 2012, 16:58
Subject: Re: [datashift_spree] undefined method `get_spree_class' (#4)

Hi Tom,

wow, that's really cool about not having to use jruby to use excel stuff!
Rather big problem to get that to work, believe a hack had to be made
in regard to 'expect'.

Pulled in from github after receiving this email/posting and
am still getting this error using '-s' for sku lookup:

try to find record where sku == LH62_organizer-whidbey-main

...and this error for '--split_file_name_on _' :

: SELECT "spree_variants".* FROM "spree_variants" WHERE
(lower(name) = 'soft-acc-2zip-coinpurse-keychain-main') LIMIT 1>
#<ActiveRecord::StatementInvalid: PG::Error: ERROR: column "name" does
not exist
LINE 1: ...e_variants".* FROM "spree_variants" WHERE (lower(name) = '_...
^
: SELECT "spree_variants".* FROM "spree_variants" WHERE (lower(name) =
'_ac102') LIMIT 1>
#<ActiveRecord::StatementInvalid: PG::Error: ERROR: column "name" does
not exist
LINE 1: ...e_variants".* FROM "spree_variants" WHERE (lower(name) = 'a...

Seems to be inconsistency in the 2 error examples above, which is curious.

Could you let me know when you have pushed up the revision?

Thanks!

Looking forward to using the new version.

Cheers,

Jet

On 10/23/2012 03:06 AM, tom statter wrote:

Hi

yeah sorry it's all a bit broken .. think it's nearly back together

basically what I've done is from the spree image loader,
created a generic paperclip loader that can be used to create any
attachment and attach to any class

There have also been issues caused by Spree core moving stuff around.

in versions > 1.1 images are now on Variantrather than Product

it means that the spree image stuff has been rewritten to use this new
paperclip loader

there are many more options now, to set the delimiter it's
--split_file_name_on _

-s is to lookup based on sku

Cheers
tom

p.s should work with Excel now in all Rubies, no reliance on jruby
any more


From: Jerrold Thompson notifications@github.com
To: autotelik/datashift_spree datashift_spree@noreply.github.com
Sent: Tuesday, 23 October 2012, 2:40
Subject: Re: [datashift_spree] undefined method `get_spree_class' (#4)

Hi Tom,
Thanks for update, all most working at this point!
I am cloning from github:
Using datashift (0.10.2) from git://github.com/autotelik/datashift.git
(at master)
Using datashift_spree (0.2.1) from
git://github.com/autotelik/datashift_spree.git (at master)
I am now using ruby 1.9.3-p194 and Spree 1.1.2
"get_spree_class" error is fixed.
I am getting the following output from:
jet@chinook:~/RailsApps/spree/aceleathergoods$ bundle exec thor
datashift:spree:images -i
/home/jet/AceLeatherGoods/Ace_Primary_Web_Photos/ -s
Below is output:
Using sku for lookup
Found 161 files - splitting names on delimiter [ ]
try to find record where sku ==
AC102_soft-acc-2zip-coinpurse-keychain-main
Nothing is imported, all files copied to MissingAttachmentRecords
is delimiter [ ] actually supposed to show current delimiter used?
If so, looks like it is not set to '" which I was hoping for.
Tried passing in
-s '
' but that did not work.
Seems this used to run perfect in version I was using in July.
Am I doing something wrong in the invocation?
Thanks!
Jet

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#4 (comment).


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants