-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WeChat 命令行模式在Rails 6命令行模式下,报 NameError: uninitialized constant Rails 错 #268
Comments
直接使用rails的logger不行吗? Rails.logger.debug "想输出啥就是啥" |
感谢回复。 |
要不你还是暂时用 [deployer@thape-web current]$ bundle exec rails c
Loading production environment (Rails 6.0.0)
irb(main):001:0> Wechat.api.callbackip
=> {"ip_list"=>["223.166.222.100", "223.166.222.101", "223.166.222.102", "223.166.222.103", "223.166.222.104", "223.166.222.105", "223.166.222.106", "223.166.222.107", "223.166.222.111", "223.166.222.112", "223.166.222.117", "223.166.222.118", "101.91.60.80", "101.91.60.81", "121.51.66.16", "121.51.66.19", "121.51.66.26", "121.51.66.120", "157.255.192.54", "157.255.192.55", "58.60.9.75", "58.60.9.76", "58.60.9.77", "58.60.9.78", "59.36.121.222", "59.36.121.223", "121.51.162.73", "121.51.162.74", "121.51.162.55", "103.7.30.71", "103.7.30.70", "103.7.30.69", "103.7.30.68", "203.205.219.187", "203.205.219.188", "203.205.219.189", "203.205.219.190"]} |
嗯 好 module Wechat class << self
end 就能调用了 |
大概的原因我知道了,因为wechat.yml中写了 |
好像比较难修,先报个错,或者使用figaro |
最新版本已经修了,v0.15.0。 |
如题,您的gem非常好,但由于微信会不断增加新功能,接口调试也需要日志支持
使用您的gem的用户,有可能不只盯着某些最新的版本,也许要支持老版本,这些都需要日志。
类似:
autoload :Logging, ...
module Wechat
class << self
attr_writer :logger
end
end
再次感谢
The text was updated successfully, but these errors were encountered: