{"action":"created","issue":{"url":"https://api.github.com/repos/lanrion/weixin_authorize/issues/65","labels_url":"https://api.github.com/repos/lanrion/weixin_authorize/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/lanrion/weixin_authorize/issues/65/comments","events_url":"https://api.github.com/repos/lanrion/weixin_authorize/issues/65/events","html_url":"https://github.com/lanrion/weixin_authorize/issues/65","id":101404768,"number":65,"title":"undefined method `get_jssign_package' for #<WeixinAuthorize::Client:0x007f6400dd95f8>","user":{"login":"u0x010","id":9703404,"avatar_url":"https://avatars.githubusercontent.com/u/9703404?v=3","gravatar_id":"","url":"https://api.github.com/users/u0x010","html_url":"https://github.com/u0x010","followers_url":"https://api.github.com/users/u0x010/followers","following_url":"https://api.github.com/users/u0x010/following{/other_user}","gists_url":"https://api.github.com/users/u0x010/gists{/gist_id}","starred_url":"https://api.github.com/users/u0x010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u0x010/subscriptions","organizations_url":"https://api.github.com/users/u0x010/orgs","repos_url":"https://api.github.com/users/u0x010/repos","events_url":"https://api.github.com/users/u0x010/events{/privacy}","received_events_url":"https://api.github.com/users/u0x010/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-17T11:56:11Z","updated_at":"2015-08-17T12:15:39Z","closed_at":null,"body":"我跟着 [JS SDK Guide](https://github.com/lanrion/weixin_authorize/wiki/js-sdk) 引入 JS 时出现\r\n```ruby\r\nundefined method `get_jssign_package' for #<WeixinAuthorize::Client:0x007f6400dd95f8>\r\n```\r\n可以看到 WeixinAuthorize::Client 已经被实例化\r\n但是却找不到方法 get_jssign_package\r\n而我在 Rails 控制台中调试却是正常的：\r\n```bash\r\n@client = WeixinAuthorize::Client.new('MYAPPID', 'MYSECRET')\r\n => #<WeixinAuthorize::Client:0x00000006d644e8 @app_id=\"MYAPPID\", @app_secret=\"MYSECRET\", @expired_at=1439809528, @jsticket_expired_at=1439809528, @redis_key=\"69BADA70FEBAD734AB6F94177715F2E8\", @jsticket_redis_key=\"C8A27434B70A6BC35E87EC5EF158A4F7\"> \r\nsign_package = @client.get_jssign_package('http://url.cn')\r\n => {\"appId\"=>\"wxcd6acbc5a9500d7b\", \"nonceStr\"=>\"f76af164ddda752fa230c6bd28ab9624\", \"timestamp\"=>1439809546, \"url\"=>\"http://url.cn\", \"signature\"=>\"0762c051babbb8995bd5cd13f92b2efee6db30cf\", \"rawString\"=>\"jsapi_ticket=kgt8ON7yVITDhtdwci0qeRz5E-G28wsVRiGU0_83PK9d0ylzs2DYONzyUxbKh32gdwTWX6GXGIskrQnxKETLvQ&noncestr=f76af164ddda752fa230c6bd28ab9624&timestamp=1439809546&url=http://url.cn\"} \r\n```\r\nClient 初始化过程：\r\n```ruby\r\nclass ApplicationController < ActionController::Base\r\nbefore_action :init_weixin\r\n  def init_weixin\r\n    $weixin_client ||= WeixinAuthorize::Client.new('MYAPPID', 'MYSECRET')\r\n  end\r\nend\r\n```\r\n我在交流群里问了几个朋友都不知道怎么回事…\r\n不知道我代码哪儿出了问题，能给思路吗？\r\n"},"comment":{"url":"https://api.github.com/repos/lanrion/weixin_authorize/issues/comments/131797287","html_url":"https://github.com/lanrion/weixin_authorize/issues/65#issuecomment-131797287","issue_url":"https://api.github.com/repos/lanrion/weixin_authorize/issues/65","id":131797287,"user":{"login":"lanrion","id":1432529,"avatar_url":"https://avatars.githubusercontent.com/u/1432529?v=3","gravatar_id":"","url":"https://api.github.com/users/lanrion","html_url":"https://github.com/lanrion","followers_url":"https://api.github.com/users/lanrion/followers","following_url":"https://api.github.com/users/lanrion/following{/other_user}","gists_url":"https://api.github.com/users/lanrion/gists{/gist_id}","starred_url":"https://api.github.com/users/lanrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanrion/subscriptions","organizations_url":"https://api.github.com/users/lanrion/orgs","repos_url":"https://api.github.com/users/lanrion/repos","events_url":"https://api.github.com/users/lanrion/events{/privacy}","received_events_url":"https://api.github.com/users/lanrion/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T12:15:39Z","updated_at":"2015-08-17T12:15:39Z","body":"> undefined method `get_jssign_package' for #<WeixinAuthorize::Client:0x007f6400dd95f8>\r\n\r\n这个问题，你重启server后，应该就解决了。"}}