visit is not working #37

Closed
BackOrder opened this Issue Jan 21, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@BackOrder
Collaborator

BackOrder commented Jan 21, 2015

The Shoes Manual on page Furthermore > Internet contains links to Shoes github, blogs, mailing list, etc. The code in https://github.com/Shoes3/shoes3/blob/master/lib/shoes/help.rb uses visit to open a web browser on the given URL. _This doesn't work on Windows but does work on MacOS X._

Also, The Shoes Manual stipulates that visit is intended to load Shoes application rather than web pages.

visit(url: a string)
Changes the location, in order to view a different Shoes URL.

Absolute URLs (such as http://google.com) are okay, but Shoes will be expecting a Shoes application to be at that address. (So, google.com won't work, as it's an HTML app.)

@BackOrder BackOrder added the Windows label Jan 21, 2015

@BackOrder BackOrder changed the title from visit not working to visit is not working Jan 21, 2015

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Jan 29, 2015

Collaborator

A multiplatform alternative to visit. Works on Windows and MacOS X but need testing on Linux.

def open_url(url)
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
    system("start #{url}")
  elsif RbConfig::CONFIG['host_os'] =~ /darwin/
    system("open #{url}")
  elsif RbConfig::CONFIG['host_os'] =~ /linux|bsd/
    system("xdg-open #{url}")
  end
end
Collaborator

BackOrder commented Jan 29, 2015

A multiplatform alternative to visit. Works on Windows and MacOS X but need testing on Linux.

def open_url(url)
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
    system("start #{url}")
  elsif RbConfig::CONFIG['host_os'] =~ /darwin/
    system("open #{url}")
  elsif RbConfig::CONFIG['host_os'] =~ /linux|bsd/
    system("xdg-open #{url}")
  end
end
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Jan 29, 2015

Contributor

xdg-open works. Thanks for reminding me about it.

Contributor

ccoupe commented Jan 29, 2015

xdg-open works. Thanks for reminding me about it.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Jan 30, 2015

Collaborator
Shoes.app {
   visit("http://www.numinoes.com/")
}

Running with cshoes.exe yields in:

Le chemin d'accès spécifié est introuvable.

Meaning Path not found.

Collaborator

BackOrder commented Jan 30, 2015

Shoes.app {
   visit("http://www.numinoes.com/")
}

Running with cshoes.exe yields in:

Le chemin d'accès spécifié est introuvable.

Meaning Path not found.

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Feb 13, 2015

Contributor

visit and xdg-open both works on Linux Ubuntu

Contributor

passenger94 commented Feb 13, 2015

visit and xdg-open both works on Linux Ubuntu

BackOrder added a commit that referenced this issue Feb 13, 2015

Using open_url instead of visit. Read issue #37.
The method visit is intended for visiting Shoes Apps on a given URL.
While it may open any URLs on certain systems, it failed on Windows.

@ccoupe ccoupe added this to the 3.2.21 milestone Feb 15, 2015

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 15, 2015

Contributor

Assigning milestone 3.2.21.

Contributor

ccoupe commented Feb 15, 2015

Assigning milestone 3.2.21.

@ccoupe ccoupe modified the milestones: 3.2.22, 3.2.21 Feb 16, 2015

@ccoupe ccoupe closed this Mar 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment