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

"Can't convert HostOS into String" #45

Closed
tsmacdonald opened this issue Jun 26, 2012 · 5 comments
Closed

"Can't convert HostOS into String" #45

tsmacdonald opened this issue Jun 26, 2012 · 5 comments

Comments

@tsmacdonald
Copy link

I'm using launchy on Crunchbang Linux, which is based on Debian and uses Openbox as a window manager. I have xdg-open installed, and it's working correctly. However, when I run launchy http://www.github.com, I get:

Failure in opening http://www.github.com with options {}: can't convert Launchy::Detect::HostOs into String

After much dropping of putses and experimentation, I fixed it by changing

    found = find_child( :matches?, host_os )

in lib/launchy/detect/host_os_family.rb:detect to

    found = find_child( :matches?, host_os.host_os )

So is this due to some quirk in my OS, or is it a bug proper? Do you want me to submit a pull request?

Thanks.

@copiousfreetime
Copy link
Owner

Is the launchy you are using one that is shipped with Crunchbang? Can you tell me what version it is that is failing for you? Or is it one that you are installing yourself? Also, could re rerun the launchy command as:

% launchy -d http://www.github.com/

And then paste the output here?

@tsmacdonald
Copy link
Author

I'm using 2.1.0, which I got through bundler (which got it through rubygems.org). I'm also using JRuby. Here's a gist with information about the environment and the debug output you wanted.

@copiousfreetime
Copy link
Owner

Thanks, I'll take a look and see what I can figure out.

@danibrear
Copy link

it's a problem with the logger line in ( launchy-2.1.0-java/lib/launchy/descendant_tracker.rb ) at line 44:

Launchy.log "Checking if class #{child} is the one for #{method}(#{args.join(', ')})}"

I commented out this line and it works just fine. It's trying to do a .join on the HostOs object which doesn't work.

@copiousfreetime
Copy link
Owner

Thanks for additional report. My apologies for not consolidating all this into a final bug fix. I'll be rolling this and a couple of other issues up into a new release here in the next week or so.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Sep 16, 2012
= Launchy Changlog
== Version 2.1.2 - 2012-08-06

* Fix where HostOS would fail to convert to string on JRuby in 1.9
  mode (copiousfreetime/launchy#45)
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Sep 22, 2012
= Launchy Changlog
== Version 2.1.2 - 2012-08-06

* Fix where HostOS would fail to convert to string on JRuby in 1.9
  mode (copiousfreetime/launchy#45)
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Oct 8, 2012
= Launchy Changlog
== Version 2.1.2 - 2012-08-06

* Fix where HostOS would fail to convert to string on JRuby in 1.9
  mode (copiousfreetime/launchy#45)
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Dec 9, 2013
= Launchy Changlog
== Version 2.1.2 - 2012-08-06

* Fix where HostOS would fail to convert to string on JRuby in 1.9
  mode (copiousfreetime/launchy#45)
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
= Launchy Changlog
== Version 2.1.2 - 2012-08-06

* Fix where HostOS would fail to convert to string on JRuby in 1.9
  mode (copiousfreetime/launchy#45)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants