Comments (8)
You did almost the correct update, that should be
Launchy.open( path )
not
Launchy.open( uri )
The parameter that was passed to Launchy::Browser.run was 'path' not 'uri'
You may still get an error, because capybara is opening up a file and not a uri. And that is a bug that I will be fixing this week.
from launchy.
This will go out with the next release of launchy
from launchy.
After making the changes described above, I'm getting this error:
[540]berklee@bizops:/web/bizops-dev git:dev$ cucumber features/leads/index.feature:21
Using the default profile...
.........sh: xprop: not found
/home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc4/lib/active_support/whiny_nil.rb:48:in method_missing': undefined method
shellsplit' for nil:NilClass (NoMethodError)
from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:41:in shell_commands' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:104:in
block in wet_run'
from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:103:in fork' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:103:in
wet_run'
from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:61:in run' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/application.rb:58:in
run'
from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy/applications/browser.rb:76:in open' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/launchy-2.0.5/lib/launchy.rb:30:in
open'
from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/capybara-1.0.0/lib/capybara/util/save_and_open_page.rb:26:in open_in_browser' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/capybara-1.0.0/lib/capybara/util/save_and_open_page.rb:19:in
save_and_open_page'
from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/capybara-1.0.0/lib/capybara/session.rb:283:in save_and_open_page' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/capybara-1.0.0/lib/capybara/dsl.rb:139:in
save_and_open_page'
from /mnt/hgfs/bizops/features/step_definitions/web_steps.rb:210:in block in <top (required)>' from /home/berklee/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-1.0.0/lib/cucumber/core_ext/instance_exec.rb:48:in
instance_exec'
. . .
It appears I'm still stuck in getting "Then show me the page" to work with Launchy
from launchy.
Can you run the following and paste the output here?
LAUNCHY_DEBUG=true cucumber features/leads/index.feature:21
And also:
ruby -rrbconfig -e "puts ::RbConfig::CONFIG['host_os']"
from launchy.
I haven't heard anything further on this issue. Are you still having a problem? If not I'll close this issue next week.
from launchy.
While testing out https://github.com/gitlabhq/gitlabhq I came across this issue while playing around with it; this problem has nothing to do with gitlabhq, it's just that with latest launch due their Gemlock I can see this:
gitlab@vserv03:~/gitlabhq$ bundle exec launchy http://slashdot.org/
sh: xprop: not found
/home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:41:in `shell_commands': undefined method `shellsplit' for nil:NilClass (NoMethodError)
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:104:in `block in wet_run'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:103:in `fork'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:103:in `wet_run'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:61:in `run'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/application.rb:58:in `run'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/applications/browser.rb:76:in `open'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy.rb:30:in `open'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/cli.rb:72:in `good_run'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/cli.rb:80:in `run'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/bin/launchy:4:in `<top (required)>'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/bin/launchy:19:in `load'
from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/bin/launchy:19:in `<main>'
It does not actually exhibit a real problem, it's just during e.g. loading the initial database there's seems to be something done using launchy which spams the screen full. After some searching I figured out it relates to launchy and did this simply test case.
I don't have cucumber installed, but I can give you the ruby output:
gitlab@vserv03:~/gitlabhq$ bundle exec ruby -rrbconfig -e "puts ::RbConfig::CONFIG['host_os']"
linux-gnu
This is a headless server so naturally there is no window manager installed thus no Xcfe and no xprop:
gitlab@vserv03:~/gitlabhq$ grep -r xprop *
vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/nix_desktop_environment.rb: %x[ xprop -root _DT_SAVE_MODE | grep ' = \"xfce\"$' ].strip.size > 0
hth
from launchy.
the best help would be if you could run:
LAUNCHY_DEBUG=true bundle exec launch http://slashdot.org
It looks to me like on that machine launchy is unable to find a way to launch a browser. The debug will help me figure out what it is.
Also, if you could do a uname -a
or similar so I could know what type of machine that is, that would help.
thanks, and we'll figure this out.
from launchy.
@mfn I somehow missed the bottom of your message.
I would expect Launchy to fail on a machine that had no browsers installed and now window manager. Launchy launches a browser, so i'm not sure what the goal of using launchy on a headless system would be.
I've put this in Issue #42 to deal with separately.
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.