I want to build a shopping cart for my website. I've installed redis/hiredis but when I start the server, if I go on a page where the shopping cart whould show a value (current items in cart), or if I want to go on the shopping cart page, the server crashes giving the following information:
Started GET "/cart" for 127.0.0.1 at 2015-05-19 13:43:33 +0300
ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by CartsController#show as HTML
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
/home/svuser/.rvm/rubies/ruby-2.2.0/bin/ruby: symbol lookup error: /home/svuser/.rvm/gems/ruby-2.2.0/gems/hiredis-0.4.5/lib/hiredis/ext/hiredis_ext.so: undefined symbol: rb_thread_select
In my index page, I create a link to the shopping cart using the following instructions :
<%if signed_in?%>
<li>
<%= link_to cart_path do%>
<i class="fi-shopping-cart"></i>
My Cart
<%end%>
Is there any way to work around this issue ? I am still new to rails and I couldn't figure it out on my own.
I faced a similar problem. In my case, I use Ruby 2.2.2p95 and old version gem hiredis - '0.4.5'. It uses method rb_thread_select, which was removed in Ruby 2.2
So bundle update hiredis
helps me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With