Skip to content
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

An error occurred with wechat command-line 1st attempt #307

Closed
caryyu opened this issue Dec 13, 2021 · 5 comments
Closed

An error occurred with wechat command-line 1st attempt #307

caryyu opened this issue Dec 13, 2021 · 5 comments
Assignees

Comments

@caryyu
Copy link

caryyu commented Dec 13, 2021

The installation steps I've made are:

  1. gem install wechat
  2. gem install rails

BTW: I took a search and found a reference about symbolize_keys related issue here https://stackoverflow.com/questions/27627663/nomethoderror-undefined-method-symbolize-keys-for-hash, I have no idea whether it is relevant to this since I tried and failed either

WARNING: If using 'Rails.application.credentials.wechat_secret!' in wechat.yml, you need run in 'rails c' and access via 'Wechat.api' or gem 'figaro' instead.
Traceback (most recent call last):
        6: from /home/caryyu/.rbenv/versions/2.7.4/bin/wechat:23:in `<main>'
        5: from /home/caryyu/.rbenv/versions/2.7.4/bin/wechat:23:in `load'
        4: from /home/caryyu/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/wechat-0.14.0/bin/wechat:13:in `<top (required)>'
        3: from /home/caryyu/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/wechat-0.14.0/bin/wechat:36:in `<class:App>'
        2: from /home/caryyu/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/wechat-0.14.0/lib/wechat/api_loader.rb:7:in `with'
        1: from /home/caryyu/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/wechat-0.14.0/lib/wechat/api_loader.rb:33:in `config'
/home/caryyu/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/wechat-0.14.0/lib/wechat/api_loader.rb:45:in `loading_config!': undefined method `symbolize_keys!' for {:default=>nil}:Hash (NoMethodError)
@Eric-Guo
Copy link
Owner

run rails credentials:edit and filling the wechat_secret as error reported if you are in some rails project, you may need to running rails new test_wechat_app to create one first.

@caryyu
Copy link
Author

caryyu commented Dec 13, 2021

In fact, I had my config set at ~/.wechat.yml already according to the instruction, is there still necessary to do credential edit again?

@caryyu
Copy link
Author

caryyu commented Dec 14, 2021

Hi @Eric-Guo, I'm a little bit confused about the command-line installation, from my understanding, If we want to utilize this project as a cli tool, we don't need to create a new project, is that right? the only things we need to do are to have gem packages installed and configure ~/.wechat.yml in advance before getting wechat run in terminal, please correct me if my speculation is wrong

@caryyu caryyu closed this as completed Dec 14, 2021
@Eric-Guo
Copy link
Owner

It's original think useful, but after you got many rails project, you always running command line in one of the rails projects. so I will remove this feature in future.

@Eric-Guo Eric-Guo reopened this Dec 15, 2021
@Eric-Guo Eric-Guo self-assigned this Dec 15, 2021
@Eric-Guo Eric-Guo pinned this issue Dec 15, 2021
@Eric-Guo
Copy link
Owner

Anyway the v0.15.0 fix it.

@Eric-Guo Eric-Guo unpinned this issue Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants