Rails Rails Wechat Gem 命令行报错

WenMellors · 2018年10月28日 · 1155 次阅读

采用 wechat gem + puma + nginx 来搭建微信公众号服务器,但是今日发现更改菜单设置文件,即使重启 puma 后仍然无法改变公众号的菜单栏,然后查看了 gem 文档 然后找到了,提供命令行来上传菜单栏 wechat menu_create wechat_menu.yaml ,可是输入之后出现了如下报错信息,然后试了一下别的命令也报错了,求解

public@asteriod:/home/buaasu_wechat$ wechat menu_create wechat_menu.yaml
(erb):13:in `<main>': uninitialized constant Rails (NameError)
    from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `eval'
    from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `result'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:52:in `config_from_file'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:31:in `loading_config!'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:26:in `config'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:4:in `with'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/bin/wechat:41:in `<class:App>'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/bin/wechat:18:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/wechat:23:in `load'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/wechat:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
public@asteriod:/home/buaasu_wechat$ wechat user
(erb):13:in `<main>': uninitialized constant Rails (NameError)
    from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `eval'
    from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `result'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:52:in `config_from_file'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:31:in `loading_config!'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:26:in `config'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/lib/wechat/api_loader.rb:4:in `with'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/bin/wechat:41:in `<class:App>'
    from /usr/local/rvm/gems/ruby-2.2.2/gems/wechat-0.7.20/bin/wechat:18:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/wechat:23:in `load'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/wechat:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号