-
Notifications
You must be signed in to change notification settings - Fork 371
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 命令无法执行问题: uninitialized constant Rails (NameError) #199
Comments
可能需要安装一下rails? gem install rails 或者方便贴一下你的wechat.yml文件么?看起来你在yml文件里面写了Rails,系统试图找这个模块,但是找不到。 |
default: &default
# corpid: "corpid"
# corpsecret: "corpsecret"
# agentid: 1
# Or if using public account, only need above two line
# appid: ""
# secret: ""
# token: "my_token"
# access_token: "C:/Users/[username]/wechat_access_token"
# encrypt_mode: false # if true must fill encoding_aes_key
# encoding_aes_key: "my_encoding_aes_key"
# jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket"
appid: <%= Rails.application.secrets['wechat_appid'] %>
secret: <%= Rails.application.secrets['wechat_secret'] %>
token: <%= Rails.application.secrets['wechat_token'] %>
timeout: 30,
skip_verify_ssl: true
encrypt_mode: false # if true must fill encoding_aes_key
# encoding_aes_key: Rails.application.secrets['wechat_access_token']
# oauth2_cookie_duration: <%= ENV['WECHAT_OAUTH2_COOKIE_DURATION'] %> # seconds
# below are save paths for files
access_token: <%= "#{Rails.root}/tmp/wechat_access_token" %>
jsapi_ticket: <%= "#{Rails.root}/tmp/wechat_jsapi_ticket" %>
production:
# corpid: <%= ENV['WECHAT_CORPID'] %>
# corpsecret: <%= ENV['WECHAT_CORPSECRET'] %>
# agentid: <%= ENV['WECHAT_AGENTID'] %>
# Or if using public account, only need above two line
appid: <%= Rails.application.secrets['wechat_appid'] %>
secret: <%= Rails.application.secrets['wechat_secret'] %>
token: <%= Rails.application.secrets['wechat_token'] %>
timeout: 30,
skip_verify_ssl: true
encrypt_mode: false # if true must fill encoding_aes_key
# encoding_aes_key: Rails.application.secrets['wechat_access_token']
# oauth2_cookie_duration: <%= ENV['WECHAT_OAUTH2_COOKIE_DURATION'] %> # seconds
# below are save paths for files
access_token: <%= "#{Rails.root}/tmp/wechat_access_token" %>
jsapi_ticket: <%= "#{Rails.root}/tmp/wechat_jsapi_ticket" %>
development:
<<: *default
trusted_domain_fullname: "http://your_dev.proxy.qqbrowser.cc"
test:
<<: *default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
最近看到了这个gem的介绍,感觉很好用,但是在命令行运行wechat 命令的时候总会遇到这个问题,而且一直debug不出来是哪里的问题,不过在rails console里可以正常使用。
所以到作者这里求个解决问题的思路quq.....
The text was updated successfully, but these errors were encountered: