rogerluan / arkana

Use dotenv files for Android and iOS projects.
BSD 2-Clause "Simplified" License
362 stars 18 forks source link

Failed to load command: arkana #69

Closed metasidd closed 1 month ago

metasidd commented 1 month ago

Hello! Whenever I run arkana, I'm seeing errors with Ruby 3.3.0. Does this look familiar? Anything other logs I could provide?

bundler: failed to load command: arkana (/opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana)
/opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/lib/arkana.rb:3:in `require_relative': cannot load such file -- /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/lib/arkana/config_parser (LoadError)
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/lib/arkana.rb:3:in `<top (required)>'
    from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
    from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/bin/arkana:4:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana:25:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli/exec.rb:58:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli/exec.rb:23:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli.rb:455:in `exec'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli.rb:35:in `dispatch'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli.rb:29:in `start'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/exe/bundle:28:in `block in <top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/exe/bundle:20:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `<main>'

Thanks in advance!

rogerluan commented 1 month ago

Hi @metasidd 👋

Have you tried installing via bundler? You can do so by adding arkana to your Gemfile and then running it via bundle exec arkana.

Let me know if that solves it! 🙏

metasidd commented 1 month ago

Unfortunately getting a similar error!

bundler: failed to load command: arkana (/opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana)
/opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/lib/arkana.rb:3:in `require_relative': cannot load such file -- /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/lib/arkana/config_parser (LoadError)
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/lib/arkana.rb:3:in `<top (required)>'
    from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
    from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/bin/arkana:4:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana:25:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli/exec.rb:58:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli/exec.rb:23:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli.rb:455:in `exec'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli.rb:35:in `dispatch'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/cli.rb:29:in `start'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/exe/bundle:28:in `block in <top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.5.13/exe/bundle:20:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `<main>'

which arkana gives...

/opt/homebrew/lib/ruby/gems/3.3.0/bin/arkana

bundler -v gives..

Bundler version 2.5.13
metasidd commented 1 month ago

Some more information from gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 3.5.11
  - RUBY VERSION: 3.3.3 (2024-06-12 patchlevel 89) [arm64-darwin23]
  - INSTALLATION DIRECTORY: /opt/homebrew/lib/ruby/gems/3.3.0
  - USER INSTALLATION DIRECTORY: /Users/[username]/.gem/ruby/3.3.0
  - RUBY EXECUTABLE: /opt/homebrew/opt/ruby/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /opt/homebrew/lib/ruby/gems/3.3.0/bin
  - SPEC CACHE DIRECTORY: /Users/[username]/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /opt/homebrew/Cellar/ruby/3.3.3/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - arm64-darwin-23
  - GEM PATHS:
     - /opt/homebrew/lib/ruby/gems/3.3.0
     - /Users/[username]/.gem/ruby/3.3.0
     - /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/gems/3.3.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => true
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /opt/homebrew/lib/ruby/gems/3.3.0/bin
     - /opt/homebrew/opt/ruby/bin
     - /opt/homebrew/bin
     - /usr/local/bin
     - /Users/[username]/Downloads/google-cloud-sdk/bin
     - /Users/[username]/Downloads/google-cloud-sdk/bin
     - /usr/local/bin
     - /System/Cryptexes/App/usr/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
     - /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
     - /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
     - /Library/Apple/usr/bin
     - /Users/[username]/.rvm/bin
metasidd commented 1 month ago

So weird, this seems to have done the trick. sudo chmod -R 755 /opt/homebrew/lib/ruby/gems/3.3.0/gems/arkana-2.1.1/