drhenner / ror_ecommerce

Ruby on Rails Ecommerce platform, perfect for your small business solution.
www.ror-e.com
MIT License
1.21k stars 409 forks source link

Adding item to cart is not working #166

Closed hugalves closed 8 years ago

hugalves commented 8 years ago

I'm trying to add an item to cart and it's not working. That's what I did:

bundle install rake secret # copy/paste the output as encryption_key in config/settings.yml rake db:create:all rake db:migrate db:seed RAILS_ENV=test rake db:test:prepare rake db:seed_fake rails s

I added an user:

`` Started POST "/customer/registrations" for ::1 at 2016-02-20 16:13:43 -0200 Processing by Customer::RegistrationsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"3eQUoZOX7H0NLGGBMGr3R8N9aMfHDw2jMZ/4TMR5GtzDHEnUQh8EAztd/ofnpfWubZFyBFC18yYjzJ5Okw/fpA==", "user"=>{"first_name"=>"XXXX", "last_name"=>"XXXXX", "email"=>"xxxx@xxxx.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Register"} Dalli::Server#connect 127.0.0.1:11211 127.0.0.1:11211 failed (count: 3) Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 11211 127.0.0.1:11211 is still down (for 18.909 seconds now) Session::DalliStore#get: No server available Can't verify CSRF token authenticity (0.1ms) begin transaction Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'xxxx@xxxx.com' LIMIT 1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."persistence_token" = 'c2a60d5291ff5d9976e0dbb361d6ab5850f460e8dfaff0044e00618849de542b85f2021dfcd9f125ca638e7b5120a8fcf257c27aabee08defa908e3a42755eba' LIMIT 1 CACHE (0.0ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'xxxx@xxxx.com' LIMIT 1 (0.1ms) SELECT "newsletters"."id" FROM "newsletters" WHERE "newsletters"."autosubscribe" = 't' Newsletter Load (0.1ms) SELECT "newsletters".* FROM "newsletters" WHERE "newsletters"."id" = ? LIMIT 1 [["id", 1]] SQL (0.5ms) INSERT INTO "users" ("password_salt", "crypted_password", "persistence_token", "first_name", "last_name", "email", "state", "account_id", "access_token", "perishable_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["password_salt", "TDrhUBmb4kxK8nMaRYA8"], ["crypted_password", "400$8$3c$a79a1ef0b45ecf57$9268217042b04c55238c04a5c894f7385d75d4191525d99e17e4fcc2169148eb"], ["persistence_token", "c2a60d5291ff5d9976e0dbb361d6ab5850f460e8dfaff0044e00618849de542b85f2021dfcd9f125ca638e7b5120a8fcf257c27aabee08defa908e3a42755eba"], ["first_name", "XXXX"], ["last_name", "XXXX"], ["email", "xxxx@xxxx.com"], ["state", "active"], ["account_id", 1], ["access_token", "533fecf73bf736c235a4a13e79e6"], ["perishable_token", "uBKunVuVjX7YeXfoyeNj"], ["created_at", "2016-02-20 18:13:43.364225"], ["updated_at", "2016-02-20 18:13:43.364225"]] Referral Load (0.1ms) SELECT "referrals".* FROM "referrals" WHERE "referrals"."email" = ? LIMIT 1 [["email", "xxxx@xxxx.com"]] SQL (0.2ms) INSERT INTO "users_newsletters" ("newsletter_id", "user_id", "updated_at") VALUES (?, ?, ?) [["newsletter_id", 1], ["user_id", 1], ["updated_at", "2016-02-20 18:13:43.412834"]] SQL (0.3ms) INSERT INTO "store_credits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) ["user_id", 1], ["created_at", "2016-02-20 18:13:43.414808"], ["updated_at", "2016-02-20 18:13:43.414808"] commit transaction [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 39cac415-778b-449f-8511-3f98302fccb6) to Inline(mailers) with arguments: "Notifier", "signup_notification", "deliver_now", 1 [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "Notifier", "signup_notification", "deliver_now", 1 [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] Rendered text template (0.0ms) [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] Rendered text template (0.0ms) [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] Notifier#signup_notification: processed outbound mail in 154.0ms [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] Sent mail to xxxx@xxxx.com (1495.0ms) [ActiveJob] [ActionMailer::DeliveryJob] [39cac415-778b-449f-8511-3f98302fccb6] Date: Sat, 20 Feb 2016 16:13:43 -0200 From: system@example.com To: XXXX XXXX xxxx@xxxx.com Message-ID: 56c8acd79883a_83553fcb9e24e77c47529@MacBook-Pro-de-Administrador-3.local.mail Subject: New account information Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_56c8acd795dd4_83553fcb9e24e77c474fa"; charset=UTF-8 Content-Transfer-Encoding: 7bit

----==_mimepart_56c8acd795dd4_83553fcb9e24e77c474fa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome! XXXX XXXX go to http://localhost:3000/customer/activation?a=uBKunVuVjX7YeXfoyeNj ----==_mimepart_56c8acd795dd4_83553fcb9e24e77c474fa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome XXXX XXXX Click to Activate ----==_mimepart_56c8acd795dd4_83553fcb9e24e77c474fa-- ``

For now, I have an user stored correctly. To activate him, I accessed http://localhost:3000/customer/activation?a=uBKunVuVjX7YeXfoyeNj

Now, it seems to be activated and my cart has no item. When I try to add an item to my cart, cute-polo-pants, clicking on 'Add to cart' button, it renders ''You don't have anything in your cart.' and my item is not added on cart.

drhenner commented 8 years ago

Is there any inventory for the item?