win32API problem running ocra in linux

  • Follow


hi all.

I'm in linux and need to make an executable version of a script for one
of my windows-using colleagues to run.  I tried with rubyscript2exe
originally and gave up after various problems and reading about
workarounds which looked like a nightmare.

So, i'm giving ocra a go.  But, it's failing with the following error:

>=== Loading script to check dependencies
>=== WARNING: I18n::Backend::ActiveRecord was not loadable
>[memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer
>/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- Win32API (MissingSourceFile)
>  from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
>  from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
>  from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
>  from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
>  from /var/lib/gems/1.8/gems/ocra-1.1.3/bin/ocra:338:in `loaded_dlls'
>  from /var/lib/gems/1.8/gems/ocra-1.1.3/bin/ocra:364:in `detect_dlls'
>  from /var/lib/gems/1.8/gems/ocra-1.1.3/bin/ocra:257:in `build_exe'
>  from /var/lib/gems/1.8/gems/ocra-1.1.3/bin/ocra:461
>  from /var/lib/gems/1.8/bin/ocra:19

I tried installing the win32-api gem but the install failed.  Can this
gem even be installed in linux?

Grateful for any advice, max
-- 
Posted via http://www.ruby-forum.com/.

0
Reply toastkid.williams (183) 2/4/2010 11:26:33 AM

On Thu, Feb 4, 2010 at 12:26 PM, Max Williams
<toastkid.williams@gmail.com> wrote:
> I'm in linux and need to make an executable version of a script for one
> of my windows-using colleagues to run. =A0I tried with rubyscript2exe
> originally and gave up after various problems and reading about
> workarounds which looked like a nightmare.
>
> So, i'm giving ocra a go. =A0But, it's failing with the following error:
>
>>/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'=
: no such file to load -- Win32API (MissingSourceFile)
>> =A0from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'

You can't build Ocra executables on Linux, because it requires a
Windows version of the Ruby interpreter to include. RubyInstaller with
Wine might be an option though, but you will have to invoke Ocra using
Wine too.

0
Reply Lars 2/4/2010 12:12:50 PM


Lars Christensen wrote:
> On Thu, Feb 4, 2010 at 12:26 PM, Max Williams
> <toastkid.williams@gmail.com> wrote:
>> I'm in linux and need to make an executable version of a script for one
>> of my windows-using colleagues to run. �I tried with rubyscript2exe
>> originally and gave up after various problems and reading about
>> workarounds which looked like a nightmare.
>>
>> So, i'm giving ocra a go. �But, it's failing with the following error:
>>
>>>/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- Win32API (MissingSourceFile)
>>> �from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
> 
> You can't build Ocra executables on Linux, because it requires a
> Windows version of the Ruby interpreter to include. RubyInstaller with
> Wine might be an option though, but you will have to invoke Ocra using
> Wine too.

doh.  the whole reason i want to do this is so my non-ruby-owning 
windows-using colleague can have an exe.  I guess i'll have to go back 
to trying to get rubyscript2exe working then.  Is there anything else 
that will work in linux for this, do you know?

thanks, max
-- 
Posted via http://www.ruby-forum.com/.

0
Reply Max 2/4/2010 12:30:58 PM

> doh.  the whole reason i want to do this is so my non-ruby-owning 
> windows-using colleague can have an exe.  I guess i'll have to go back 
> to trying to get rubyscript2exe working then.  Is there anything else 
> that will work in linux for this, do you know?


you might be interested in this:

http://wiki.github.com/rdp/ruby_talk_faq/#ruby_to_exe

-r
-- 
Posted via http://www.ruby-forum.com/.

0
Reply rogerpack2005 (1307) 2/5/2010 4:38:04 PM

Thanks Roger, but i can't see anything mentioned there that would work 
for me besides rubyscript2exe which i already discussed.   Is there 
something i missed?
-- 
Posted via http://www.ruby-forum.com/.

0
Reply toastkid.williams (183) 2/5/2010 5:08:42 PM

> doh.  the whole reason i want to do this is so my non-ruby-owning 
> windows-using colleague can have an exe.  I guess i'll have to go back 
> to trying to get rubyscript2exe working then.  Is there anything else 
> that will work in linux for this, do you know?

Ahh so you're looking for something in linux that will build an 
executable for windows users?  I don't know if anything like that 
exists--the option you may not have seen from the link is exerb.
-r
-- 
Posted via http://www.ruby-forum.com/.

0
Reply rogerpack2005 (1307) 2/5/2010 5:48:58 PM

Yeah - i think exerb needs to build the exe in windows as well. I'll 
check it out though, thanks.
-- 
Posted via http://www.ruby-forum.com/.

0
Reply toastkid.williams (183) 2/5/2010 6:46:52 PM

6 Replies
522 Views

(page loaded in 0.101 seconds)

Similiar Articles:










7/22/2012 2:59:10 AM


Reply: