-
Notifications
You must be signed in to change notification settings - Fork 105
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
initconfig => error: can't modify frozen String #265
Comments
Can you run your app with
|
imac:etl4api mickael$ GLI_DEBUG=true bundle exec bin/etl4api initconfig
error: can't modify frozen String
bundler: failed to load command: bin/etl4api (bin/etl4api)
RuntimeError: can't modify frozen String
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/commands/initconfig.rb:41:in `force_encoding'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/commands/initconfig.rb:41:in `block in create_config'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/commands/initconfig.rb:38:in `map'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/commands/initconfig.rb:38:in `create_config'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/commands/initconfig.rb:27:in `block in initialize'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/command_support.rb:131:in `execute'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/app_support.rb:296:in `block in call_command'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/app_support.rb:309:in `call_command'
/Users/mickael/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/gli-2.16.0/lib/gli/app_support.rb:83:in `run'
bin/etl4api:176:in `<top (required)>' If you wonder line 176 has : |
It's this line: https://github.com/davetron5000/gli/blob/gli-2/lib/gli/commands/initconfig.rb#L41 That line might not be needed any longer—I think it was added for support of an old Ruby. If you want to try removing it and making a PR we can see if the current build matrix passes it. |
Hi,
I have
# frozen_string_literal: true
at the beginning of my bin file.When I run
bundle exec bin/app initconfig
I get this error:error: can't modify frozen String
I have to use
# frozen_string_literal: false
to succeed the command.How I can I make it work with
# frozen_string_literal: true
.Thx for your help.
The text was updated successfully, but these errors were encountered: