Ruby Shipping Gem Help

Discussion in 'Ruby' started by Hunter Hillegas, Oct 27, 2005.

  1. Hi,

    I am trying to use the Ruby shipping gem (http://shipping.rubyforge.org/) to
    get prices from FedEx. Has anyone used this? I have some questions:

    * Instead of using the shipping.yml file in a user's home directory, is
    there somewhere else I can put it? This is a Rails app so I don't really
    want to put stuff in the home directory of the user.

    * I must be doing something wrong. I get the same price every time. My code
    is as follows (the account details are constants):

    ship = Shipping::Base.new :packaging_type => "FEDEXBOX", :zip => '93101',
    :state => 'CA', :sender_zip => '89109', :weight => '2', :service_type =>
    'PRIORITYOVERNIGHT'

    ship.fedex_account = FEDEX_ACCOUNT
    ship.fedex_meter = FEDEX_METER
    ship.fedex_url = FEDEX_URL

    logger.debug "PRICE: #{ship.fedex.price} WEIGHT: #{@total_weight} GRADE:
    #{ship.service_type}"

    If I change the service type to 2-day or ground, I always get the same
    price, 3.75.

    What am I doing wrong? How can I get the prices for different service
    levels?

    Thanks,
    Hunter
     
    Hunter Hillegas, Oct 27, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. linkswanted
    Replies:
    1
    Views:
    949
  2. Joe Van Dyk

    Ruby Shipping gem question

    Joe Van Dyk, Aug 24, 2006, in forum: Ruby
    Replies:
    0
    Views:
    90
    Joe Van Dyk
    Aug 24, 2006
  3. Joe Van Dyk

    fedex shipping gem question

    Joe Van Dyk, Sep 11, 2006, in forum: Ruby
    Replies:
    1
    Views:
    111
    William Crawford
    Sep 11, 2006
  4. PJ Kelly

    Ruby Shipping Gem Setup

    PJ Kelly, Nov 9, 2006, in forum: Ruby
    Replies:
    0
    Views:
    136
    PJ Kelly
    Nov 9, 2006
  5. Juan Zanos

    Shipping a gem with jruby.jar

    Juan Zanos, Mar 26, 2009, in forum: Ruby
    Replies:
    7
    Views:
    125
    Juan Zanos
    Mar 26, 2009
Loading...

Share This Page