librelist archives

« back to archive

Component not Located

Component not Located

From:
Roger Lovelock
Date:
2011-07-13 @ 23:58
Hi,
   I am using Raisins (Vista machine) and trying to load the Launchy Gem 
in my program by using Shoes.setup.

Shoes.setup do
   gem 'launchy'
end
require 'launchy'
.....

  I am getting the following error message :-

     Shoes: shoes.exe - Unable to Locate Component
This application has failed to start because SSLEAY32.dll was not found. 
Re-installing the application may fix this problem.

A search of my PC failed to locate any such dll
   Can anyone help please?

Roger Lovelock

Re: [shoes] Component not Located

From:
Steve Klabnik
Date:
2011-07-14 @ 00:13
Weeeeell what are you going to use Launchy for?

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-14 @ 00:23
I am creating a pdf file (a report from an sqlite database) using FPDF 
for Ruby (which creates the pdf file OK). I then want to open it for 
display and optional printing. It opens OK manually in either a 
pdfviewer or a browser - I wanted to use Launchy to open it in a browser 
(launchy only supports browsers at the moment) - all in a fully 
cross-platform way of course.

On 14/07/2011 10:13 AM, Steve Klabnik wrote:
> Weeeeell what are you going to use Launchy for?
>
>

Re: [shoes] Component not Located

From:
Steve Klabnik
Date:
2011-07-14 @ 03:05
Gotcha. I'm on my phone ATM, and can't quitenremember the method, but shoes
has one (open?) that will open something in a browser, built in. Search the
manual, or ill point you to it when I can. :)

Aaand we should look into why it doesn't work. I don't think it uses c
extensions...
On Jul 13, 2011 8:23 PM, "Roger Lovelock" <rogerlovelock@aanet.com.au>
wrote:
> I am creating a pdf file (a report from an sqlite database) using FPDF
> for Ruby (which creates the pdf file OK). I then want to open it for
> display and optional printing. It opens OK manually in either a
> pdfviewer or a browser - I wanted to use Launchy to open it in a browser
> (launchy only supports browsers at the moment) - all in a fully
> cross-platform way of course.
>
> On 14/07/2011 10:13 AM, Steve Klabnik wrote:
>> Weeeeell what are you going to use Launchy for?
>>
>>

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-14 @ 04:32
Had a hunt through the manual with search with no success - when you 
have time (no rush) could you please point me in the right direction - 
many thanks! The problem with the launchy gem may be related to my 
'ignorance'. I have downloaded the 'launchy gem' and tried it in various 
places (my apps home directory, the shoes gem directory etc) - I may not 
have it in the right place - or there may be more required to install it 
- I am just working from references in the mailing list archive.
Thanks for your help,
Roger

On 14/07/2011 1:05 PM, Steve Klabnik wrote:
>
> Gotcha. I'm on my phone ATM, and can't quitenremember the method, but 
> shoes has one (open?) that will open something in a browser, built in. 
> Search the manual, or ill point you to it when I can. :)
>
> Aaand we should look into why it doesn't work. I don't think it uses c 
> extensions...
>
> On Jul 13, 2011 8:23 PM, "Roger Lovelock" <rogerlovelock@aanet.com.au 
> <mailto:rogerlovelock@aanet.com.au>> wrote:
> > I am creating a pdf file (a report from an sqlite database) using FPDF
> > for Ruby (which creates the pdf file OK). I then want to open it for
> > display and optional printing. It opens OK manually in either a
> > pdfviewer or a browser - I wanted to use Launchy to open it in a 
> browser
> > (launchy only supports browsers at the moment) - all in a fully
> > cross-platform way of course.
> >
> > On 14/07/2011 10:13 AM, Steve Klabnik wrote:
> >> Weeeeell what are you going to use Launchy for?
> >>
> >>

Re: [shoes] Component not Located

From:
Steve Klabnik
Date:
2011-07-14 @ 12:15
> Had a hunt through the manual with search with no success - when you have
> time (no rush) could you please point me in the right direction - many
> thanks!

No worries! We're trying to improve Shoes' documentation, there are
lots of little corners.

Aaaand I found out what it is, and the manual is lying! It's 'visit':

Shoes.app do
  visit "http://google.com"
end

That opens google in my browser.

> The problem with the launchy gem may be related to my 'ignorance'. I
> have downloaded the 'launchy gem' and tried it in various places (my apps
> home directory, the shoes gem directory etc) - I may not have it in the
> right place - or there may be more required to install it - I am just
> working from references in the mailing list archive.

Ah! You don't need to do all that! Here:

Shoes.setup do
  gem "launchy"
end

Put that at the beginning of your code, and Shoes will download and
install the gem for you.

Unfortunately, when I try this, Shoes complains that it can't install
the gem, because we are running too old a version of Rubygems. You can
install older versions of gems by adding a gem "launchy", "0.0.1" or
whatever.

But in this case, visit should work for you, I think.

-Steve

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-14 @ 21:46
Many thanks for looking that up for me. Your example works OK for me, 
but when I try to access a local file nothing happens (no error either). 
The code I am using is as follows :-

     pdf.Output('example2.pdf')
     urlName = File.expand_path('example2.pdf')
     alert urlName
     visit "file:///" + urlName

The alert shows the correct full path to my pdf, which I can open 
manually OK. I have tried with both Firefox and Internet Explorer as my 
default browser with the same result. Am I doing something silly with 
the URL - I have a feeling I am doing something basic wrong! Any help 
much appreciated!
Roger

On 14/07/2011 10:15 PM, Steve Klabnik wrote:
>> Had a hunt through the manual with search with no success - when you have
>> time (no rush) could you please point me in the right direction - many
>> thanks!
> No worries! We're trying to improve Shoes' documentation, there are
> lots of little corners.
>
> Aaaand I found out what it is, and the manual is lying! It's 'visit':
>
> Shoes.app do
>    visit "http://google.com"
> end
>
> That opens google in my browser.
>
>> The problem with the launchy gem may be related to my 'ignorance'. I
>> have downloaded the 'launchy gem' and tried it in various places (my apps
>> home directory, the shoes gem directory etc) - I may not have it in the
>> right place - or there may be more required to install it - I am just
>> working from references in the mailing list archive.
> Ah! You don't need to do all that! Here:
>
> Shoes.setup do
>    gem "launchy"
> end
>
> Put that at the beginning of your code, and Shoes will download and
> install the gem for you.
>
> Unfortunately, when I try this, Shoes complains that it can't install
> the gem, because we are running too old a version of Rubygems. You can
> install older versions of gems by adding a gem "launchy", "0.0.1" or
> whatever.
>
> But in this case, visit should work for you, I think.
>
> -Steve
>
>

Re: [shoes] Component not Located

From:
ashbb
Date:
2011-07-15 @ 12:29
Hi Roger,

Try out the following. ;-)

Shoes.app do
   button 'open pdf' do
     system '"C:/Program Files/Mozilla Firefox/firefox.exe" ./example.pdf'
   end
end

ashbb

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-15 @ 21:50
Thanks ashbb - I'd already tried that and it worked fine as did a couple 
of other variations such as  :-
   system("start example2.pdf")
and
  shell = WIN32OLE.new('Shell.Application')   # windows only!
  shell.ShellExecute('example2.pdf')

The latter was better as it did not open a console window.

What I was trying to do was to find a way of opening the pdf which was 
cross-platform ie I could distribute my software and have it work on any 
OS etc it was installed on, hence my reason for playing with Launchy and 
trying the 'visit' command to open my pdf.
Thanks
Roger

On 15/07/2011 10:29 PM, ashbb wrote:
> system '"C:/Program Files/Mozilla Firefox/firefox.exe" ./example.pdf'

Re: [shoes] Component not Located

From:
ashbb
Date:
2011-07-15 @ 23:53
Oh, I see.
Thank you for sharing your work. I've learned a lot.
Let's continue enjoying Shoes. ;-)

ashbb

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-15 @ 23:58
Thanks - but I still haven't resolved my problem - can I open a local 
pdf using visit?

On 16/07/2011 9:53 AM, ashbb wrote:
> Oh, I see.
> Thank you for sharing your work. I've learned a lot.
> Let's continue enjoying Shoes. ;-)
>
> ashbb

Re: [shoes] Component not Located

From:
ashbb
Date:
2011-07-16 @ 01:57
Hi Roger,

> can I open a local pdf using visit?
Sorry, I think it's not possible.
Because Shoes only judges by the header 'http|https', not 'file://' for now.

ashbb

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-16 @ 06:55
OK - thanks for that.

On 16/07/2011 11:57 AM, ashbb wrote:
> Hi Roger,
>
> > can I open a local pdf using visit?
> Sorry, I think it's not possible.
> Because Shoes only judges by the header 'http|https', not 'file://' 
> for now.
>
> ashbb

Re: [shoes] Component not Located

From:
Cecil Coupe
Date:
2011-07-16 @ 08:09
Roger,

 Instead of debugging all the ways Shoes visit and launchy won't work
(there are many edge cases for each that will fail) write a shoes
alert/window/dialog thingy that defaults to  'system (start ..)' for
Windows, 'system (open ...)' for OSX and for linux you can default to
system (gnome-open...) That covers 95% of the audience. Also allow the
user to browse for the App they want to use to open a .pdf and then
you've got 100%. Twenty lines of Shoes code?

Shoes is funny or liberating in that way. There is often a simple user
written GUI solution when you re-think about the problem in a different
way. 

--Cecil

On Sat, 2011-07-16 at 16:55 +1000, Roger Lovelock wrote:
> OK - thanks for that.
> 
> On 16/07/2011 11:57 AM, ashbb wrote:
> > Hi Roger,
> >
> > > can I open a local pdf using visit?
> > Sorry, I think it's not possible.
> > Because Shoes only judges by the header 'http|https', not 'file://' 
> > for now.
> >
> > ashbb

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-16 @ 08:15
Thanks - I'll give that a go!
Roger

On 16/07/2011 6:09 PM, Cecil Coupe wrote:
> Roger,
>
>   Instead of debugging all the ways Shoes visit and launchy won't work
> (there are many edge cases for each that will fail) write a shoes
> alert/window/dialog thingy that defaults to  'system (start ..)' for
> Windows, 'system (open ...)' for OSX and for linux you can default to
> system (gnome-open...) That covers 95% of the audience. Also allow the
> user to browse for the App they want to use to open a .pdf and then
> you've got 100%. Twenty lines of Shoes code?
>
> Shoes is funny or liberating in that way. There is often a simple user
> written GUI solution when you re-think about the problem in a different
> way.
>
> --Cecil
>
> On Sat, 2011-07-16 at 16:55 +1000, Roger Lovelock wrote:
>> OK - thanks for that.
>>
>> On 16/07/2011 11:57 AM, ashbb wrote:
>>> Hi Roger,
>>>
>>>> can I open a local pdf using visit?
>>> Sorry, I think it's not possible.
>>> Because Shoes only judges by the header 'http|https', not 'file://'
>>> for now.
>>>
>>> ashbb
>
>
>

Re: [shoes] Component not Located

From:
Steve Klabnik
Date:
2011-07-14 @ 13:50
And by 'the manual is wrong' I mean, "I read the manual wrong." :)

Re: [shoes] Component not Located

From:
Roger Lovelock
Date:
2011-07-14 @ 03:48
Ta - I'll have a look and let you know!

On 14/07/2011 1:05 PM, Steve Klabnik wrote:
>
> Gotcha. I'm on my phone ATM, and can't quitenremember the method, but 
> shoes has one (open?) that will open something in a browser, built in. 
> Search the manual, or ill point you to it when I can. :)
>
> Aaand we should look into why it doesn't work. I don't think it uses c 
> extensions...
>
> On Jul 13, 2011 8:23 PM, "Roger Lovelock" <rogerlovelock@aanet.com.au 
> <mailto:rogerlovelock@aanet.com.au>> wrote:
> > I am creating a pdf file (a report from an sqlite database) using FPDF
> > for Ruby (which creates the pdf file OK). I then want to open it for
> > display and optional printing. It opens OK manually in either a
> > pdfviewer or a browser - I wanted to use Launchy to open it in a 
> browser
> > (launchy only supports browsers at the moment) - all in a fully
> > cross-platform way of course.
> >
> > On 14/07/2011 10:13 AM, Steve Klabnik wrote:
> >> Weeeeell what are you going to use Launchy for?
> >>
> >>