I am trying to install Rsense, I am following the directions from here Rsense Docs
RSENSE_HOME is set but i cannot install the jruby win32-service to complete the steps to have the rsense service started at boot.
This is the full error, I also ran as error suggested specifying jruby version. Any ideas on completing the install?
C:\Users\RenshawFamily>echo %RSENSE_HOME%
C:\Rsense
C:\Users\RenshawFamily>jruby -S gem install win32-service
Fetching: win32-api-1.4.8.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing win32-service:
ERROR: Failed to build gem native extension.
c:/jruby-1.6.3/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very wel
l.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
checking for strncpy_s()... IOError: Cannot run program "cc" (in directory "C:\j
ruby-1.6.3\lib\ruby\gems\1.8\gems\win32-api-1.4.8\ext"): CreateProcess error=2,
The system cannot find the file specified
popen at org/jruby/RubyIO.java:3540
xpopen at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:323
open at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:260
xpopen at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:316
egrep_cpp at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:538
have_func at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:758
checking_for at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:652
postpone at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:286
open at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:260
postpone at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:286
open at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:260
postpone at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:282
checking_for at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:651
have_func at c:/jruby-1.6.3/lib/ruby/site_ruby/shared/mkmf.rb:755
(root) at extconf.rb:9
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=c:/jruby-1.6.3/bin/jruby
Gem files will remain installed in c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/win32-a
pi-1.4.8 for inspection.
Results logged to c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/win32-api-1.4.8/ex开发者_运维问答t/gem_
make.out
C:\Users\RenshawFamily>jruby -S gem install win32-service --ruby=c:/jruby-1.6.3/
bin/jruby
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --ruby=c:/jruby-1.6.3/bin/jruby
win32-service
uses C extensions. Gems that use C extensions are generally not compatible with JRuby, although there are efforts being made to address that - see here for background
Are you able to use MRI/CRuby for your project?
Or you could use a java based service management lib, but then that might not work with emacs/rsense.
Or you could roll up your sleeves and make win32-service
JRuby compatible!
I had the same problem when installing the win-32-service gem. This solved it:
gem install win32-service --platform=mswin32
So your command should probably be
jruby -S gem install win32-service --platform=mswin32
although I'm guessing here.
精彩评论