Skip to content

wechat 命令无法执行问题: uninitialized constant Rails (NameError) #199

Open
@1625081

Description

(erb):13:in `<main>': uninitialized constant Rails (NameError)
	from /home/z/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/erb.rb:896:in `eval'
	from /home/z/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/erb.rb:896:in `result'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/lib/wechat/api_loader.rb:88:in `resovle_config_file'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/lib/wechat/api_loader.rb:74:in `config_from_file'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/lib/wechat/api_loader.rb:28:in `loading_config!'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/lib/wechat/api_loader.rb:23:in `config'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/lib/wechat/api_loader.rb:5:in `with'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/bin/wechat:41:in `<class:App>'
	from /home/z/.rvm/gems/ruby-2.4.1/gems/wechat-0.8.12/bin/wechat:18:in `<top (required)>'
	from /home/z/.rvm/gems/ruby-2.4.1/bin/wechat:22:in `load'
	from /home/z/.rvm/gems/ruby-2.4.1/bin/wechat:22:in `<main>'
	from /home/z/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
	from /home/z/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'

最近看到了这个gem的介绍,感觉很好用,但是在命令行运行wechat 命令的时候总会遇到这个问题,而且一直debug不出来是哪里的问题,不过在rails console里可以正常使用。

所以到作者这里求个解决问题的思路quq.....

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions