sferik / t-ruby

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

Please let us know if this is no longer supported so we won't bother you with issues :) #420

Open pitosalas opened 4 years ago

pitosalas commented 4 years ago
/m/s/twitter_example (master=) t authorize
Welcome! Before you can use t, you'll first need to register an
application with Twitter. Just follow the steps below:
  1. Sign in to the Twitter Application Management site and click
     "Create New App".
  2. Complete the required fields and submit the form.
     Note: Your application must have a unique name.
  3. Go to the Permissions tab of your application, and change the
     Access setting to "Read, Write and Access direct messages".
  4. Go to the Keys and Access Tokens tab to view the consumer key
     and secret which you'll need to copy and paste below when
     prompted.

Press [Enter] to open the Twitter Developer site.

Enter your API key: xxxx
Enter your API secret: xxx
Traceback (most recent call last):
    7: from /Users/pitosalas/.rbenv/versions/2.6.5/bin/t:23:in `<main>'
    6: from /Users/pitosalas/.rbenv/versions/2.6.5/bin/t:23:in `load'
    5: from /Users/pitosalas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/t-3.1.0/bin/t:20:in `<top (required)>'
    4: from /Users/pitosalas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
    3: from /Users/pitosalas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
    2: from /Users/pitosalas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    1: from /Users/pitosalas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
/Users/pitosalas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/t-3.1.0/lib/t/cli.rb:82:in `authorize': uninitialized constant Twitter::REST::Client::BASE_URL (NameError)
~/m/s/twitter_example (master=) [1;2B[1;2B[1;2B
dend commented 4 years ago

This is a workaround more so than anything, but try this:

# Install command-line Twitter tools.
sudo gem install t

# Fix issue with Twitter command-line tools.
sudo gem install twitter -v 6.1.0
sudo gem uninstall twitter -v 6.2.0
jm3 commented 3 years ago

don't need sudo, above; just use:

gem install twitter -v 6.1.0; gem uninstall twitter -v 6.2.0

riclage commented 3 years ago

Doesn't work with Ruby 2.7.2 or 3.0.0 on MacOS:

Traceback (most recent call last):
    7: from ~/.rubies/ruby-2.7.2/bin/t:23:in `<main>'
    6: from ~/.rubies/ruby-2.7.2/bin/t:23:in `load'
    5: from ~/.rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/t-3.1.0/bin/t:20:in `<top (required)>'
    4: from ~/.rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
    3: from ~/.rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
    2: from ~/.rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    1: from ~/.rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
~/.rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/t-3.1.0/lib/t/cli.rb:82:in `authorize': uninitialized constant Twitter::REST::Client::BASE_URL (NameError)

Tried with both twitter 6.1.0 and 6.2.0.

riclage commented 3 years ago

This workaround worked: https://github.com/sferik/twitter/issues/878#issuecomment-349718252