Closed cheater closed 1 year ago
Tried this in ruby 2.1 as well, with same result.
I'm getting the same issue, not quite sure what to do either. My ruby version is ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
.
It seems to be failing to find a constant in the twitter
library, it's looking in Twitter::REST::Client but from what I can see in the file - https://github.com/sferik/twitter/blob/d7951759da897e6a8e3ed0069b2e850470991e3f/lib/twitter/rest/client.rb it's not there. It seems to actually be in Twitter::REST::Request I believe?
Ah I see the issue - https://github.com/sferik/twitter/compare/v6.1.0...v6.2.0 BASE_URL used to reside in that file but has been moved. So when Twitter 6.2.0 was released, versions of this are breaking.
Any chance someone could fix the version to 6.1.0 so this library will continue working? I'm not a huge ruby expert, you'd also need publish access.
Yeah, I guess if moving the constant out to a different location was a deliberate move, then this should be flagged as a breaking change, thus a major release should've been released. Got here from getting the same error when running a fresh install of https://github.com/sferik/t (gem install t
).
I'd suggest unpublishing v6.2.0
(gem yank
?) and republishing it as v7.0.0
.
Iām working on a fix for this issue now. Sorry for the trouble.
Thanks @sferik, looking forward to being able to use the CLI client š
Thank you for working on this, waiting on it :D
Patiently waiting for this fix as well. Thanks for working on it! š
Also waiting :-) Thanks!
Also waiting. Thanks for working on this! š
waiting here as well...thanks!
OK guys i know you're impatient but this nagging absolutely has to stop. I get retarded "bump" notifications every day. This isn't goddamn twitter. Go live out your ADHD over there. The guy obviously hasn't been on github since november - look at his activity - so what are you trying to achieve with this? He's busy with his real life (yeah, some people have one) and is going to get around to it... WHEN HE GETS AROUND TO IT. Stop nagging or I'll close the bug report!
Here's your workaround folks: edit /Library/Ruby/Gems/2.3.0/gems/t-3.1.0/lib/t/cli.rb
, or maybe /Library/Ruby/Gems/*/gems/t-*/lib/t/cli.rb
if you don't have that file. Replace the two instances of Twitter::REST::Client::BASE_URL
with Twitter::REST::Request::BASE_URL
and you're good to go.
expanding on @rvagg: ubuntu 17.10, file was located at /var/lib/gems/2.3.0/gems/t-3.1.0/lib/t/cli.rb
expanding on @rvagg: OS X 10.12.6 w/ rvm, file was located at ~/.rvm/gems/ruby-2.4.3/gems/t-3.1.0/lib/t/cli.rb
rvagg's workaround doesn't work for me. The error changes to:
/var/lib/gems/2.3.0/gems/t-3.1.0/lib/t/rcfile.rb:89:in `profiles': undefined method `[]' for false:FalseClass (NoMethodError)
@sferik would love some help getting this fixed so i can use t again!
It's not the prettiest solution, but if anyone just wants to get this working you can do it with bundler: Make a Gemfile with gem "t"
and gem "twitter", "6.1.0"
, call bundle install
and then run it with bundle exec t
Also not the prettiest solution:
I copy the .twurlrc (from Twurl https://github.com/twitter/twurl) to .trc
then run t
as usual.
cheers
@fuzz or @ialexs, could either of you describe these two solutions in a little more detail?
I didn't see .twurlrc
in the Twurl repo, and I don't know that I have bundle
installed. I'm not familiar with that tool, and the name seems pretty Google-proof.
Thanks,
@jasonhemann
gem install twurl
twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}
Essentially what @ialexs seems to mean is, copy the file generated by twurl
The above totally worked for me
Ah editing the cli.rb worked fine! Didn't realize there were two instances. Many thanks.
The path to my cli.rb file was listed in the error message output after I entered my API keys (my path was different from the paths listed above).
Once I edited both instances of Twitter::REST::Request::BASE_URL, the installation completed.
Really, this has been broken for eight months without a fix? WTH?
Let's be nice here. This is a 12-year old open-source project. It is not unreasonable that the original maintainer might not jump in and fix bugs after all that time.
Anyone with Ruby skills and sufficient interest could contribute a fix. (I myself actually spent a little while freshening my rusty Ruby skills to see if I could fix this issue, but I just have not had time to devote to it.)
166 people have contributed to this repo over the years, so I suspect there are multiple people out there who would be able and willing to fix this.
@eobrain any suggestions for how best to appeal to some of those people?
For those just running into this issue (like myself), this solution worked for me.
Holy shit happy new year. Also having this issue. When is a fork coming to Rubygem that will be maintained, jesus.
This bug totally sucks, spent a ton of time trying all these solutions and none worked. Are there any alternatives to the twitter
ruby gem?
@jasonhemann
- Go to https://apps.twitter.com/
- Ensure your app (whether newly created or otherwise) has Read, Write and Access direct messages permissions
- Locally run
gem install twurl
- Run
twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}
- Follow the steps it requests that you do
- Copy ~/.twurlr to ~/.trc
Essentially what @ialexs seems to mean is, copy the file generated by twurl
@jasonhemann
- Go to https://apps.twitter.com/
- Ensure your app (whether newly created or otherwise) has Read, Write and Access direct messages permissions
- Locally run
gem install twurl
- Run
twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}
- Follow the steps it requests that you do
- Copy ~/.twurlr to ~/.trc
Essentially what @ialexs seems to mean is, copy the file
I now get this error:
/Library/Ruby/Gems/2.3.0/gems/twurl-0.9.3/lib/twurl/cli.rb:94:in parse_options': invalid option: --8yZ1Sso8SKsPJG7F0BYMT62QG (OptionParser::InvalidOption) from /Library/Ruby/Gems/2.3.0/gems/twurl-0.9.3/lib/twurl/cli.rb:17:in
run'
from /Library/Ruby/Gems/2.3.0/gems/twurl-0.9.3/bin/twurl:4:in <top (required)>' from /usr/local/bin/twurl:22:in
load'
from /usr/local/bin/twurl:22:in `
@cognitive137 I think you should probably reset/delete that API key as it looks like it's been printed out in your error log there. (Editing your github comment will not remove it as there is a history of comments avalible). You should do this asap or someone may be able to use twitter as you š¢
@BlueHatbRit , thank you!
@jasonhemann
- Go to https://apps.twitter.com/
- Ensure your app (whether newly created or otherwise) has Read, Write and Access direct messages permissions
- Locally run
gem install twurl
- Run
twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}
- Follow the steps it requests that you do
- Copy ~/.twurlr to ~/.trc
Essentially what @ialexs seems to mean is, copy the file generated by twurl
That's the fix! Many thanks @jasonhemann
@jasonhemann
1. Go to https://apps.twitter.com/ 2. Ensure your app (whether newly created or otherwise) has Read, Write and Access direct messages permissions 3. Locally run `gem install twurl` 4. Run `twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}` 5. Follow the steps it requests that you do 6. Copy ~/.twurlr to ~/.trc
Essentially what @ialexs seems to mean is, copy the file generated by twurl
It's works for me too. You missing c on the last command (should be cp ~/.twurlrc ~/.trc). Thank you.
Here's your workaround folks: edit
/Library/Ruby/Gems/2.3.0/gems/t-3.1.0/lib/t/cli.rb
, or maybe/Library/Ruby/Gems/*/gems/t-*/lib/t/cli.rb
if you don't have that file. Replace the two instances ofTwitter::REST::Client::BASE_URL
withTwitter::REST::Request::BASE_URL
and you're good to go.
This worked for me too! I was almost giving up.
@jasonhemann
- Go to https://apps.twitter.com/
- Ensure your app (whether newly created or otherwise) has Read, Write and Access direct messages permissions
- Locally run
gem install twurl
- Run
twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}
- Follow the steps it requests that you do
- Copy ~/.twurlr to ~/.trc
Essentially what @ialexs seems to mean is, copy the file generated by twurl
This is still working! Thanks! š
Assuming this got fixed in #479 and reared its head due to some other issue now.
I literally only installed ruby 2.4, then did gem install t, and this is what happened.
Traceback:
gem list
says:Not sure how to progress. Workarounds?