sferik / t-ruby

A command-line power tool for Twitter.
http://sferik.github.com/t
MIT License
5.43k stars 412 forks source link

`force_encoding': can't modify frozen String: "" (FrozenError) #452

Closed gunvantsr closed 1 year ago

gunvantsr commented 2 years ago

Hi everyone,

i'm trying to setup t on my ubuntu 20.04 system. I'm using ruby 2.7.0 version.

here is my error log. could someone please help out?

``t list create following-date "+%Y-%m-%d" Traceback (most recent call last): 20: from /usr/local/bin/t:23:in

' 19: from /usr/local/bin/t:23:in load' 18: from /var/lib/gems/2.7.0/gems/t-3.1.0/bin/t:20:in<top (required)>' 17: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in start' 16: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:indispatch' 15: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command' 14: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:inrun' 13: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:243:in block in subcommand' 12: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:116:ininvoke' 11: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in dispatch' 10: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:ininvoke_command' 9: from /var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in run' 8: from /var/lib/gems/2.7.0/gems/t-3.1.0/lib/t/list.rb:46:increate' 7: from /var/lib/gems/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/lists.rb:328:in create_list' 6: from /var/lib/gems/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:64:inperform_post_with_object' 5: from /var/lib/gems/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:72:in perform_request_with_object' 4: from /var/lib/gems/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:50:inperform_request' 3: from /var/lib/gems/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/request.rb:37:in perform' 2: from /usr/lib/ruby/2.7.0/forwardable.rb:229:inempty?' 1: from /var/lib/gems/2.7.0/gems/http-3.3.0/lib/http/response/body.rb:52:in to_s' /var/lib/gems/2.7.0/gems/http-3.3.0/lib/http/response/body.rb:52:inforce_encoding': can't modify frozen String: "" (FrozenError)

obiwankennedy commented 2 years ago

Hello in order to fix this issue. I modify the file body.rb from http as this commit:

https://github.com/httprb/http/commit/2df5e461bf22d1eba2db72b524630cd99cc2eb4d It seems enough to make t work again. I'm not familiar to ruby app. So, I believe there is a way to install an updated version of http but I don't know how.

pavellishin commented 2 years ago

Hello in order to fix this issue. I modify the file body.rb from http as this commit:

httprb/http@2df5e46 It seems enough to make t work again. I'm not familiar to ruby app. So, I believe there is a way to install an updated version of http but I don't know how.

Where does that file live, locally? I know almost nothing about ruby, so I'd love to do this, but I don't know how!

pavellishin commented 2 years ago

Ah, looks like it's in /usr/local/lib/ruby/gems/3.1.0/gems/http-3.3.0/lib/http/response/body.rb.

cooljeanius commented 1 year ago

oh hey I just managed to update t and am now getting this issue too... tweets still post despite the error message, though!