rogerluan / arkana

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

`require_relative': cannot load such file in 2.1.0 #64

Closed BozzaDaniel closed 3 months ago

BozzaDaniel commented 3 months ago

After updating to 2.1.0 this error occurred after running the following command:

arkana -l kotlin -c .arkana.yml -e .env

On Windows:

(erb):1:in `require_relative': cannot load such file -- C:/path/to/my/project/lib/arkana/helpers/string (LoadError)
        from (erb):1:in `get_binding'
        from C:/Ruby32-x64/lib/ruby/3.2.0/erb.rb:429:in `eval'
        from C:/Ruby32-x64/lib/ruby/3.2.0/erb.rb:429:in `result'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/arkana-2.1.0/lib/arkana/kotlin_code_generator.rb:58:in `render'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/arkana-2.1.0/lib/arkana/kotlin_code_generator.rb:43:in `set_up_kotlin_interfaces'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/arkana-2.1.0/lib/arkana/kotlin_code_generator.rb:23:in `generate'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/arkana-2.1.0/lib/arkana.rb:54:in `call'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/arkana-2.1.0/lib/arkana.rb:54:in `run'
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/arkana-2.1.0/bin/arkana:8:in `<top (required)>'
        from C:/Ruby32-x64/bin/arkana:32:in `load'
        from C:/Ruby32-x64/bin/arkana:32:in `<main>'

On macOS:

Traceback (most recent call last):
        6: from /opt/homebrew/opt/ruby@2.7/bin/arkana:25:in `<main>'
        5: from /opt/homebrew/opt/ruby@2.7/bin/arkana:25:in `load'
        4: from /opt/homebrew/Cellar/ruby@2.7/2.7.8_1/lib/ruby/gems/2.7.0/gems/arkana-2.1.0/bin/arkana:4:in `<top (required)>'
        3: from /opt/homebrew/Cellar/ruby@2.7/2.7.8_1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
        2: from /opt/homebrew/Cellar/ruby@2.7/2.7.8_1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
        1: from /opt/homebrew/Cellar/ruby@2.7/2.7.8_1/lib/ruby/gems/2.7.0/gems/arkana-2.1.0/lib/arkana.rb:3:in `<top (required)>'
/opt/homebrew/Cellar/ruby@2.7/2.7.8_1/lib/ruby/gems/2.7.0/gems/arkana-2.1.0/lib/arkana.rb:3:in `require_relative': cannot load such file -- /opt/homebrew/Cellar/ruby@2.7/2.7.8_1/lib/ruby/gems/2.7.0/gems/arkana-2.1.0/lib/arkana/config_parser (LoadError)

Release 2.0.0 works without any errors.

rogerluan commented 3 months ago

Hi @BozzaDaniel, thanks for your report!

I was able to reproduce this issue and will work on fixing this as soon as possible. In the mean time, please revert to using v2.0.0 if possible. Sorry about the inconvenience! I'll post updates as soon as I have them.

rogerluan commented 3 months ago

@BozzaDaniel @dcacenabes This has been fixed and released on v2.1.1

@BozzaDaniel Again, thank you so much for reporting this! It would've taken me a lot longer to realize this was broken otherwise. In the PR where I fixed this, I changed how I run integration tests (there was a bug on those), so this type of issue won't happen again 🙏

Cheers!

dcacenabes commented 3 months ago

@BozzaDaniel @dcacenabes This has been fixed and released on v2.1.1

@BozzaDaniel Again, thank you so much for reporting this! It would've taken me a lot longer to realize this was broken otherwise. In the PR where I fixed this, I changed how I run integration tests (there was a bug on those), so this type of issue won't happen again 🙏

Cheers!

Already bumped, working like a charm!