celebrated too soon

admin interface says undefined method `name' for []:Array
when i try to create or view a shipping method
On Thursday, February 21, 2013 6:19:11 PM UTC-8, German Garcia wrote:

Changed initializer to

initializer "spree.register.calculators", :after =>
"spree_active_shipping.register.calculators" do |app|
app.config.spree.calculators.shipping_methods <<
Spree::Calculator::FedexMx::Base.descendants
end


and now it worked :D
On Thursday, February 21, 2013 12:55:15 PM UTC-8, German Garcia wrote:

I'm trying to add a second shipping location that's in mexico, according
to fedex I cant use the same account to ship from there, so i cloned
spree_active_shipping to try and add the other credentials.

So far what I have is this https://gist.github.com/geermc4/5008086 , I
made that at first on the gem's source and when it worked I figured it be
best to have it on my app so I could avoid updating my
spree_active_shipping fork so i moved the changes over, but here it doesn't
work


Here's what I get if i try to get into the console

/Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:6:
warning: toplevel constant ActiveShipping referenced by
Spree::Calculator::ActiveShipping
/Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:6:in
`<module:FedexMx>': uninitialized constant ActiveShipping::Base (NameError)
from
/Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:5:in
`<class:Calculator>'
from
/Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:4:in
`<module:Spree>'
from
/Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:3:in
`<top (required)>'
from /Users/geermc4/Sites/store/config/application.rb:75:in `block in
<class:Application>'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
`instance_exec'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
`run'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:55:in
`block in run_initializers'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
`each'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
`run_initializers'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:136:in
`initialize!'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in
`method_missing'
from /Users/geermc4/Sites/store/config/environment.rb:5:in `<top
(required)>'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
`require'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
`require'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:103:in
`require_environment!'
from
/opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:40:in
`<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'



I've tried to change the inheritance to some others, but there's
something i'm not getting apparently cus' none worked so far


Any advice is apreciated :)
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • German Garcia at Feb 22, 2013 at 2:35 am
    trace

    /Users/geermc4/.bundler/ruby/1.9.1/spree-36a59eb31147/core/app/controllers/spree/admin/shipping_methods_controller.rb:33:in `each'
    /Users/geermc4/.bundler/ruby/1.9.1/spree-36a59eb31147/core/app/controllers/spree/admin/shipping_methods_controller.rb:33:in `sort_by'
    /Users/geermc4/.bundler/ruby/1.9.1/spree-36a59eb31147/core/app/controllers/spree/admin/shipping_methods_controller.rb:33:in `load_data'

    On Thursday, February 21, 2013 6:35:16 PM UTC-8, German Garcia wrote:

    celebrated too soon

    admin interface says undefined method `name' for []:Array
    when i try to create or view a shipping method
    On Thursday, February 21, 2013 6:19:11 PM UTC-8, German Garcia wrote:

    Changed initializer to

    initializer "spree.register.calculators", :after =>
    "spree_active_shipping.register.calculators" do |app|
    app.config.spree.calculators.shipping_methods <<
    Spree::Calculator::FedexMx::Base.descendants
    end


    and now it worked :D
    On Thursday, February 21, 2013 12:55:15 PM UTC-8, German Garcia wrote:

    I'm trying to add a second shipping location that's in mexico, according
    to fedex I cant use the same account to ship from there, so i cloned
    spree_active_shipping to try and add the other credentials.

    So far what I have is this https://gist.github.com/geermc4/5008086 , I
    made that at first on the gem's source and when it worked I figured it be
    best to have it on my app so I could avoid updating my
    spree_active_shipping fork so i moved the changes over, but here it doesn't
    work


    Here's what I get if i try to get into the console

    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:6:
    warning: toplevel constant ActiveShipping referenced by
    Spree::Calculator::ActiveShipping
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:6:in
    `<module:FedexMx>': uninitialized constant ActiveShipping::Base (NameError)
    from
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:5:in
    `<class:Calculator>'
    from
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:4:in
    `<module:Spree>'
    from
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:3:in
    `<top (required)>'
    from /Users/geermc4/Sites/store/config/application.rb:75:in `block in
    <class:Application>'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
    `instance_exec'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
    `run'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:55:in
    `block in run_initializers'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
    `each'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
    `run_initializers'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:136:in
    `initialize!'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in
    `method_missing'
    from /Users/geermc4/Sites/store/config/environment.rb:5:in `<top
    (required)>'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:103:in
    `require_environment!'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:40:in
    `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'



    I've tried to change the inheritance to some others, but there's
    something i'm not getting apparently cus' none worked so far


    Any advice is apreciated :)
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • German Garcia at Feb 22, 2013 at 3:56 am
    ok Spree::Calculator::FedexMx::Base.descendants = [] ... :D
    On Thursday, February 21, 2013 6:35:32 PM UTC-8, German Garcia wrote:

    trace

    /Users/geermc4/.bundler/ruby/1.9.1/spree-36a59eb31147/core/app/controllers/spree/admin/shipping_methods_controller.rb:33:in `each'
    /Users/geermc4/.bundler/ruby/1.9.1/spree-36a59eb31147/core/app/controllers/spree/admin/shipping_methods_controller.rb:33:in `sort_by'
    /Users/geermc4/.bundler/ruby/1.9.1/spree-36a59eb31147/core/app/controllers/spree/admin/shipping_methods_controller.rb:33:in `load_data'

    On Thursday, February 21, 2013 6:35:16 PM UTC-8, German Garcia wrote:

    celebrated too soon

    admin interface says undefined method `name' for []:Array
    when i try to create or view a shipping method
    On Thursday, February 21, 2013 6:19:11 PM UTC-8, German Garcia wrote:

    Changed initializer to

    initializer "spree.register.calculators", :after =>
    "spree_active_shipping.register.calculators" do |app|
    app.config.spree.calculators.shipping_methods <<
    Spree::Calculator::FedexMx::Base.descendants
    end


    and now it worked :D
    On Thursday, February 21, 2013 12:55:15 PM UTC-8, German Garcia wrote:

    I'm trying to add a second shipping location that's in mexico,
    according to fedex I cant use the same account to ship from there, so i
    cloned spree_active_shipping to try and add the other credentials.

    So far what I have is this https://gist.github.com/geermc4/5008086 , I
    made that at first on the gem's source and when it worked I figured it be
    best to have it on my app so I could avoid updating my
    spree_active_shipping fork so i moved the changes over, but here it doesn't
    work


    Here's what I get if i try to get into the console

    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:6:
    warning: toplevel constant ActiveShipping referenced by
    Spree::Calculator::ActiveShipping
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:6:in
    `<module:FedexMx>': uninitialized constant ActiveShipping::Base (NameError)
    from
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:5:in
    `<class:Calculator>'
    from
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:4:in
    `<module:Spree>'
    from
    /Users/geermc4/Sites/store/app/models/spree/calculator/fedex_mx/base.rb:3:in
    `<top (required)>'
    from /Users/geermc4/Sites/store/config/application.rb:75:in `block in
    <class:Application>'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
    `instance_exec'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
    `run'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:55:in
    `block in run_initializers'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
    `each'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
    `run_initializers'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:136:in
    `initialize!'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in
    `method_missing'
    from /Users/geermc4/Sites/store/config/environment.rb:5:in `<top
    (required)>'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:103:in
    `require_environment!'
    from
    /opt/local/lib/ruby1.9/gems/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:40:in
    `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'



    I've tried to change the inheritance to some others, but there's
    something i'm not getting apparently cus' none worked so far


    Any advice is apreciated :)
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedFeb 22, '13 at 2:35a
activeFeb 22, '13 at 3:56a
posts3
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

German Garcia: 3 posts

People

Translate

site design / logo © 2022 Grokbase