Comments (11)
Are you running this on a machine that has no display? Launchy is a library that opens up a browser. 't' is a library that does command line twitter. So, if you are running t on a system that does not have a browser installed, launchy will probably fail when t attempts to use launchy to open up a browser so that t may be authorized for twitter.
Does that make sense?
In any case, feel free to do the following
% export LAUNCHY_DEBUG=true
% gem t authorize --display-url
And post the output here. I'll do what I can to help.
from launchy.
vagrant@precise32:~/t$ bundle exec t authorize -d
Faraday: you may want to install system_timer for reliable timeouts
/var/lib/gems/1.8/gems/faraday-0.8.7/lib/faraday/request/multipart.rb:4: warning: already initialized constant DEFAULT_BOUNDARY
Welcome! Before you can use t, you'll first need to register an
application with Twitter. Just follow the steps below:
- Sign in to the Twitter Developer site and click
"Create a new application". - Complete the required fields and submit the form.
Note: Your application must have a unique name.
We recommend: "/t". - Go to the Settings tab of your application, and change the
Access setting to "Read, Write and Access direct messages". - Go to the Details 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.
LAUNCHY_DEBUG: Checking if class Launchy::Application::Browser is the one for handles?(https://dev.twitter.com/apps)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Jruby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Rbx is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::MacRuby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Jruby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Rbx is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::MacRuby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Fluxbox is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Xfce is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Launchy::Application : Unable to find xprop' in /var/lib/gems/1.8/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /opt/vagrant_ruby/bin LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()} LAUNCHY_DEBUG: Current Desktop environment not found. Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new LAUNCHY_DEBUG: Launchy::Application : Unable to find
xdg-open' in /var/lib/gems/1.8/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /opt/vagrant_ruby/bin
/var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy/applications/browser.rb:62:in browser_cmdline': Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new (Launchy::CommandNotFoundError) from /var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy/applications/browser.rb:66:in
cmd_and_args'
from /var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy/applications/browser.rb:77:in open' from /var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy.rb:29:in
open'
from /home/vagrant/t/lib/t/cli.rb:82:in authorize' from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/command.rb:27:in
send'
from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/command.rb:27:in run' from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/invocation.rb:120:in
invoke_command'
from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor.rb:363:in dispatch' from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/base.rb:438:in
start'
from /home/vagrant/t/bin/t:20
from /var/lib/gems/1.8/bin/t:19:in `load'
from /var/lib/gems/1.8/bin/t:19
from launchy.
@GeoffreyPlitt Can you tell me more about how you are running this command? What operating system, is it a remote server with no graphical display?
It looks like you are running t authorize -d
on a remote linux machine that has no graphical display or even X11 installed.
At this point I'm guess this is a bug in the interaction between t
and launchy
. One or the other of them will need a fix. I'll figure this out and update launchy or submit a pull request to @sferik as appropriate.
from launchy.
Yes, it's a Vagrant box, no display. Thanks!
from launchy.
Alright, stay tuned, it might be a day or two.
from launchy.
@copiousfreetime Thanks. Sorry for punting these issues to you, but they seem to be coming from launchy
and the error message specifically suggests:
file a bug at https://github.com/copiousfreetime/launchy/issues/new
If I'm using launchy
wrong, I'll happily fix it myself (no need for you to submit a pull request).
The -d
flag is supposed to invoke launchy
with :dry_run => true
, so it shouldn't matter that the VM is headless, as long as it can write to STDOUT
.
Basically, I just want to display the URL if there's no way to automatically open it.
from launchy.
@sferik not a problem and it'll make me finally get around to playing and testing with t
:-)
from launchy.
I think I have a solution worked out. It'll involve changing both launchy
and t
. stay tuned.
from launchy.
@copiousfreetime Please do share. Since posting, I've received another bug report about this: sferik/t-ruby#98
from launchy.
basically I'm going to allow an error block to be passed to launchy to be called if an error happens. The combine that with a patch to t that utilizes it and prints the url if launchy would have raised an exception. I'm getting on a plane here shortly, I'll be coding it up today.
from launchy.
Fixed and version 2.3 released.
from launchy.
Related Issues (20)
- Settings get cleared after some time HOT 1
- "Unable to find a browser command" when using launchy in gitpod and other IDE's HOT 3
- Rspec E2E testing function HOT 2
- Please rerun with environment variable
- 1
- Anyway to set the browser tab like in <a href="" target="">? HOT 6
- Launchy seems to error since 28th Feb since 2.5.0 was released HOT 3
- (WSL) Failing calls to xdg-open in do not trigger exception block HOT 2
- Launchy::CommandNotFoundError HOT 1
- Launchy 2.5 introduces breaking changes by requiring ruby 2.4 HOT 1
- Failure: Launchy::Application::Browser#test_0002_when host_os is 'darwin' the appropriate 'app_list' method is called HOT 1
- Launchy::CommandNotFoundError HOT 1
- useMatcapTexture broken? HOT 1
- Support for WSL: Spaces in cmd path, translate pathname from WSL2 to Windows HOT 6
- High severity vulnerability in gem dependency HOT 1
- / HOT 1
- Incompatible with the `debug` gem? (`after_fork': undefined method `open' for #<DEBUGGER__::ProcessGroup) HOT 2
- Deprecated: remove deprecated.rb
- Typo: in https://github.com/copiousfreetime/launchy/blob/master/lib/launchy/detect/ruby_engine.rb#L18
- Arc Integration HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from launchy.