Skip to content
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

`authorize': uninitialized constant Twitter::REST::Client::BASE_URL (NameError) #402

Open
improvethings opened this issue May 31, 2018 · 9 comments

Comments

Projects
None yet
9 participants
@improvethings
Copy link

commented May 31, 2018

$ 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:
Enter your API secret:
/Library/Ruby/Gems/2.3.0/gems/t-3.1.0/lib/t/cli.rb:82:in authorize': uninitialized constant Twitter::REST::Client::BASE_URL (NameError) from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from /Library/Ruby/Gems/2.3.0/gems/t-3.1.0/bin/t:20:in <top (required)>'
from /usr/local/bin/t:22:in load' from /usr/local/bin/t:22:in

'

$ uname -srm
Darwin 17.5.0 x86_64
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.4
$ system_profiler SPSoftwareDataType
Software:

System Software Overview:

  System Version: macOS 10.13.4 (17E202)
  Kernel Version: Darwin 17.5.0
  Boot Volume: osx
  Boot Mode: Normal

$ t --version
3.1.0

@keekerdc

This comment has been minimized.

Copy link

commented Jun 4, 2018

Can reproduce here. Probably an update to the twitter gem?

@fronbasal

This comment has been minimized.

Copy link

commented Jun 9, 2018

Having the same issue.

@jpluscplusm

This comment has been minimized.

Copy link

commented Jun 10, 2018

Same issue here, just installed t system-wide on OSX 10.11.6.

Traceback (most recent call last):
	7: from /usr/local/bin/t:23:in `<main>'
	6: from /usr/local/bin/t:23:in `load'
	5: from /usr/local/lib/ruby/gems/2.5.0/gems/t-3.1.0/bin/t:20:in `<top (required)>'
	4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
	3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
	2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
	1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/t-3.1.0/lib/t/cli.rb:82:in `authorize': uninitialized constant Twitter::REST::Client::BASE_URL (NameError)
$ t --version
3.1.0
@wayne5540

This comment has been minimized.

Copy link

commented Jun 11, 2018

For anyone who is looking for a quick solution, you can try sferik/twitter#878 (comment)

It works for me.

@jorisvanzundert

This comment has been minimized.

Copy link

commented Jul 23, 2018

Had the same issue on ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17], for me this fix sferik/twitter#878 (comment) worked by addressing the https://github.com/sferik/twitter api differently.

I cannot however estimate if this fix would mend the problem in general and in a proper way. Hope that a better informed maintainer can judge?

@devlato

This comment has been minimized.

Copy link

commented Feb 8, 2019

The issue still reproduces. Any way to fix that?

@epitron

This comment has been minimized.

Copy link

commented Feb 25, 2019

t works with v6.1.0 of the twitter gem, so I fixed it by running:

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

The simplest upstream fix is to change t.gemspec's twitter dependency to ~> 6.1.0 instead of ~> 6.0. (Submitted a pull request with this change: #412)

@mitchellkrogza

This comment has been minimized.

Copy link

commented Jun 2, 2019

Thanks @epitron your simple solution worked a treat.

@epitron

This comment has been minimized.

Copy link

commented Jun 3, 2019

@sferik Would you mind merging the pull request? (#412) This gem has been in a broken state for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.