The bundled version of prunsrv doesn't work on Windows Server 2008 R2 64-bit #3

Closed
calavera opened this Issue Jul 28, 2011 · 7 comments

Comments

Projects
None yet
2 participants
Contributor

calavera commented Jul 28, 2011

this other one works though:

http://archive.apache.org/dist/commons/daemon/binaries/windows/

And I don't even remember which version is bundled.

Can we ship a 32-bit and 64-bit versions and somehow use one or another? I bet the one shipped now is 32-bit.

I think I am also running into this problem... I get the service to work fine on Windows 7 32 bit but I am not getting any joy out of Windows server, swapping out prunserv.exe also does not solve the problem...

Great gem by the way! It is a real life saver

Contributor

calavera commented Sep 30, 2011

Hi @veldtmana,

I commit a possible solution to this problem here:

26924fe

but unfortunately I don't have a window box to test it with. Would you mind to test it for me? I released a pre version of the gem so you only have to install it with the command below and if it doesn't work you only need to uninstall it to get the your previous version:

gem install trinidad_init_services -v 1.1.0.pre

Thank you!

Great!! I will test it out immediately

Hi @calavera,

When I run it I get the following error:

C:\Prodispace\sims>jruby -S trinidad_init_service
SyntaxError: c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/trinidad_init_services-1.1.0.pre/lib/trinidad_init_services/configuration.rb:123: syntax error, unexpected ':'

    prunsrv = 'prunsrv_' + (ia64? 'ia64' : 'amd64') + '.exe'
                                         ^

require at org/jruby/RubyKernel.java:1047
require at c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/trinidad_init_services-1.1.0.pre/lib/trinidad_init_services/configuration.rb:29
(root) at c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/trinidad_init_services-1.1.0.pre/bin/trinidad_init_service:1
load at org/jruby/RubyKernel.java:1073
(root) at c:/jruby-1.6.3/bin/trinidad_init_service:19

I had a look at your code, can't really see what the problem is.

Ran a fiew tests that might interest you:

C:\Prodispace\sims>jirb
irb(main):001:0> RbConfig::CONFIG['host_os']
=> "mswin32"
irb(main):003:0> RbConfig::CONFIG['arch']
=> "universal-java1.6"

Hope this helps

C:\Prodispace\sims>jruby -v
jruby 1.6.3 (ruby-1.9.2-p136) (2011-07-07 965162f) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_23) [Windows Server 2008 R2-amd64-java]

Contributor

calavera commented Oct 3, 2011

agggghhhh, sorry, my bad. I've fixed it and release pre2, you can install it with":

gem install trinidad_init_services -v 1.1.0.pre2

Thanks again for give this a try!

Hi @calavera,

Sorry for taking so long to get back to you (it's been a hectic few days)...

One more bug:

C:\Prodispace\sims> jruby -S trinidad_init_service
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Application path? c:\prodispace\sims
Service name? {Alphanumeric and spaces only} [Trinidad]
Trinidad options?(separated by ;) [-e production]
JRuby home? [c:\jruby-1.6.3]
Ruby 1.8.x or 1.9.x compatibility? [RUBY1_8] RUBY1_9
NameError: undefined local variable or method `prunsrv' for #Trinidad::InitServices::Configuration:0xba679e
configure_windows_service at c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/trinidad_init_services-1.1.0.pre2/lib/trinidad_init_services/configuration.rb:88

The code @line 88:

system "#{prunsrv} #{command}"

the variable prunsrv is not defined anywhere, did you mean prunsrv_path ?

I've forked your repo and cloned it to my gems folder on the test machine, so I think it will be the easiest to just tell me what to do once I get it working I will push it back up.

Contributor

calavera commented Nov 3, 2011

I'm sorry but I've been busy as hell and I didn't have time to get back on this.

That was just another stupid typo. I fixed it and released the version 1.1.0.pre3

@calavera calavera closed this Nov 3, 2011

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