arkana: Failed to load command: arkana - Undefined method capitalize_first_letter
I added arkana to my gem file:
gem 'arkana'
And installed with
bundle install
It appears to be a success. However, when I try to run “bundle exec arkana” in my command line, I get the following error:
bundler: failed to load command: arkana (/Users/jean-baptistebolh/.rbenv/versions/2.7.3/bin/arkana)
NoMethodError: undefined method `capitalize_first_letter' for #<Array:0x0000000155b08f00>
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/lib/arkana/models/config.rb:47:in `each'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/lib/arkana/models/config.rb:47:in `map'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/lib/arkana/models/config.rb:47:in `initialize'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/lib/arkana/config_parser.rb:14:in `new'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/lib/arkana/config_parser.rb:14:in `parse'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/lib/arkana.rb:16:in `run'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/arkana-2.0.0/bin/arkana:8:in `<top (required)>'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/bin/arkana:23:in `load'
/Users/jean-baptistebolh/.rbenv/versions/2.7.3/bin/arkana:23:in `<top (required)>'
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15 (6 by maintainers)
I also noticed that your local ruby version is set to be below 3. I believe that Arkana needs ruby to be above version 3
Hi @rogerluan thanks for checking in! Apologies for not getting back quickly, been a busy day at work…
I think I figured it out since my command just ran successfully so first of all, THANK YOU!
For the README improvements, I’ll try to spell out instructions as I would tell them to someone else after going through this experience. I’ll admit this may be more verbose than what you will end up with, but here we go.
Example: Lets image a situation where you have the following for an API called “SomeAPI”: production key: “ABCDEFG1234” debug key: “XYZLMNO1234”
.env
Notice how arkana needs you to name the variables in .env as the environment_secret followed by the environment name.
If using bundle run
bundle exec arkanaThat’s how it works in my brain… let me know if I’m not thinking about this correctly and thank you again for the help 😃
@JeanBaptisteBolh please let me know if the info above resolves the issues you were seeing 😃 Looking forward to hearing back from you! 🙇
Thank you so much for the feedback @alexspurlock25 ! I’ll make sure the documentation is more clear 🙇
I’m glad to hear you enjoy using Arkana! ❤️
Right, so when I started using Arkana - works great by the way - I wasn’t told that I HAD to create two files. Maybe I missed that somewhere, but I did get lost initially. I hope this helps someway.
I love the library by the way.
@alexspurlock25
We have [what I believed to be] an extensive documentation in the project’s README, would you be able to point out areas we could improve it? And/or perhaps @JeanBaptisteBolh could contribute too with some fresh ideas? 😃 I’d love to hear them all!
Hey everyone! Sorry I’m late for the party 😄
I really appreciate your input here @alexspurlock25, I love to see this community engagement ❤️
@JeanBaptisteBolh it seems like you’re struggling with setting Arkana up for the first time. I suggest reading the
Usagesection of the README: https://github.com/rogerluan/arkana?tab=readme-ov-file#usage — it points to a template.ymlfile you could be using as your starting point for your.arkana.ymlfile 😊I don’t know where/how you came up with the syntax for that yaml file you wrote, but it should be like this instead:
I hope this helps! Let me know if you still have issues 🤗
@JeanBaptisteBolh have you initialized your
.arkana.ymlfile for Arkana? There isn’t really an onboarding process. But I remember getting this error as well. Somewhere in the documentation, you will find a template for this file.