{"action":"created","issue":{"url":"https://api.github.com/repos/agoragames/leaderboard/issues/57","labels_url":"https://api.github.com/repos/agoragames/leaderboard/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/agoragames/leaderboard/issues/57/comments","events_url":"https://api.github.com/repos/agoragames/leaderboard/issues/57/events","html_url":"https://github.com/agoragames/leaderboard/issues/57","id":75605410,"number":57,"title":"Redis connection not being set","user":{"login":"camillavk","id":8478978,"avatar_url":"https://avatars.githubusercontent.com/u/8478978?v=3","gravatar_id":"","url":"https://api.github.com/users/camillavk","html_url":"https://github.com/camillavk","followers_url":"https://api.github.com/users/camillavk/followers","following_url":"https://api.github.com/users/camillavk/following{/other_user}","gists_url":"https://api.github.com/users/camillavk/gists{/gist_id}","starred_url":"https://api.github.com/users/camillavk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camillavk/subscriptions","organizations_url":"https://api.github.com/users/camillavk/orgs","repos_url":"https://api.github.com/users/camillavk/repos","events_url":"https://api.github.com/users/camillavk/events{/privacy}","received_events_url":"https://api.github.com/users/camillavk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-12T13:37:12Z","updated_at":"2015-05-20T13:27:13Z","closed_at":"2015-05-20T09:33:24Z","body":"I'm trying to create a leaderboard in my app and it is all working locally but when I try to push it the production environment (in Heroku) it's not accepting the redis_connection option. I know the redis connection is working as on the heroku console it is connecting fine. However when this code runs:\r\n\r\n`def self.default_leaderboard`\r\n    `TieRankingLeaderboard.new(`\r\n    `DEFAULT_BOARD,`\r\n    `default_options,`\r\n   ` :redis_connnection => Redis.current`\r\n  `  )`\r\n  `end`\r\n\r\n(in my initializers/redis.rb is:\r\n`uri = ENV[ENV[\"REDIS_PROVIDER\"]]` \r\n`Redis.current = Redis.new(:url => uri)`\r\n)\r\n\r\nThis gives me an error saying it can't connect to the Redis server on the localhost. Is there a reason why it is trying to connect to the localhost (even though there is no reference to the localhost anywhere?) and it is not using the `:redis_connection => Redis.current`?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/agoragames/leaderboard/issues/comments/103888586","html_url":"https://github.com/agoragames/leaderboard/issues/57#issuecomment-103888586","issue_url":"https://api.github.com/repos/agoragames/leaderboard/issues/57","id":103888586,"user":{"login":"czarneckid","id":72727,"avatar_url":"https://avatars.githubusercontent.com/u/72727?v=3","gravatar_id":"","url":"https://api.github.com/users/czarneckid","html_url":"https://github.com/czarneckid","followers_url":"https://api.github.com/users/czarneckid/followers","following_url":"https://api.github.com/users/czarneckid/following{/other_user}","gists_url":"https://api.github.com/users/czarneckid/gists{/gist_id}","starred_url":"https://api.github.com/users/czarneckid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czarneckid/subscriptions","organizations_url":"https://api.github.com/users/czarneckid/orgs","repos_url":"https://api.github.com/users/czarneckid/repos","events_url":"https://api.github.com/users/czarneckid/events{/privacy}","received_events_url":"https://api.github.com/users/czarneckid/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T13:27:12Z","updated_at":"2015-05-20T13:27:12Z","body":"Odd, I'm not seeing that behavior locally:\r\n\r\n```ruby\r\n@orth ➜  leaderboard rvm:(ruby-2.2.1@leaderboard_gem) git:(master) be irb\r\n2.2.1 :001 > require 'redis'\r\n => true\r\n2.2.1 :002 > require 'leaderboard'\r\n => true\r\n2.2.1 :003 >\r\n2.2.1 :004 >   Redis.current = Redis.new(url: 'redis://localhost:6379/15')\r\n => #<Redis client v3.1.0 for redis://localhost:6379/15>\r\n2.2.1 :005 >\r\n2.2.1 :006 >   leaderboard = Leaderboard.new('highscores', Leaderboard::DEFAULT_OPTIONS, redis_connection: Redis.current)\r\n => #<Leaderboard:0x007ff16d1d44b0 @leaderboard_name=\"highscores\", @reverse=false, @page_size=25, @member_key=:member, @rank_key=:rank, @score_key=:score, @member_data_key=:member_data, @member_data_namespace=\"member_data\", @global_member_data=false, @redis_connection=#<Redis client v3.1.0 for redis://localhost:6379/15>>\r\n2.2.1 :007 > p leaderboard.instance_variable_get(:@redis_connection)\r\n#<Redis client v3.1.0 for redis://localhost:6379/15>\r\n => #<Redis client v3.1.0 for redis://localhost:6379/15>\r\n2.2.1 :008 > leaderboard = Leaderboard.new('highscores', Leaderboard::DEFAULT_OPTIONS, :redis_connection => Redis.current)\r\n => #<Leaderboard:0x007ff16d2de1d0 @leaderboard_name=\"highscores\", @reverse=false, @page_size=25, @member_key=:member, @rank_key=:rank, @score_key=:score, @member_data_key=:member_data, @member_data_namespace=\"member_data\", @global_member_data=false, @redis_connection=#<Redis client v3.1.0 for redis://localhost:6379/15>>\r\n2.2.1 :009 > p leaderboard.instance_variable_get(:@redis_connection)\r\n#<Redis client v3.1.0 for redis://localhost:6379/15>\r\n => #<Redis client v3.1.0 for redis://localhost:6379/15>\r\n2.2.1 :010 >\r\n```"}}