<?xml version="1.0" encoding="windows-1252"?>
<node id="947629" title="trouble installing CPAN module &quot;Ruby&quot;" created="2012-01-12 15:23:08" updated="2012-01-12 15:23:08">
<type id="115">
perlquestion</type>
<author id="630086">
technojosh</author>
<data>
<field name="doctext">
I come to the monks for assistance.  I have a large bit of Perl code and modules I have written for our company.  We are now going to try to get a bit of work somebody has done in a ruby class, integrated into my project. My ideal solution for this is some flavor of inline ruby, or otherwise accessing the ruby interpreter on the system to interact with a ruby class from within our Perl code.
&lt;p&gt;
I am on Windows 7, using AS Perl 5.14 (x86)
&lt;br&gt;
&lt;a href="http://search.cpan.org/~gfuji/Ruby-0.07/lib/Ruby.pod"&gt;CPAN: Ruby&lt;/a&gt;
&lt;p&gt;
I get the makefile to run successfully.  It's output:
&lt;br&gt;
&lt;code&gt;
C:\Ruby-0.07&gt;perl makefile.pl
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Using C:\Ruby192\bin\ruby.exe
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

ruby-inc: C:/Ruby192/lib/ruby/1.9.1/i386-mingw32
libdir  : C:/Ruby192/lib
ruby-lib: -lmsvcrt-ruby191
ruby-hdr: C:/Ruby192/include/ruby-1.9.1
Note (probably harmless): No library found for -lmsvcrt-ruby191
Writing Makefile for Ruby
Writing MYMETA.yml
&lt;/code&gt;
&lt;/p&gt;
When I run dmake, most of the output seems benign but there are two errors near the end and it does not complete successfully:
&lt;p&gt;
&lt;code&gt;
cp Ruby/intern.h blib\lib\Ruby\intern.h
cp lib/Ruby/PerlObject.pod blib\lib\Ruby\PerlObject.pod
cp Ruby/oniguruma.h blib\lib\Ruby\oniguruma.h
cp Ruby/regex.h blib\lib\Ruby\regex.h
cp lib/Ruby/Inspect.pm blib\lib\Ruby\Inspect.pm
cp Ruby/util.h blib\lib\Ruby\util.h
cp Ruby/backward/rubyio.h blib\lib\Ruby\backward\rubyio.h
cp Ruby/io.h blib\lib\Ruby\io.h
cp Ruby/version.h blib\lib\Ruby\version.h
cp Ruby/backward/util.h blib\lib\Ruby\backward\util.h
cp Ruby/dl.h blib\lib\Ruby\dl.h
cp Ruby/vm.h blib\lib\Ruby\vm.h
cp Ruby/encoding.h blib\lib\Ruby\encoding.h
cp Ruby/backward/rubysig.h blib\lib\Ruby\backward\rubysig.h
cp lib/Ruby/Run.pm blib\lib\Ruby\Run.pm
cp lib/Ruby.pod blib\lib\Ruby.pod
cp Ruby/backward/st.h blib\lib\Ruby\backward\st.h
cp lib/Ruby/Object.pod blib\lib\Ruby\Object.pod
cp Ruby/win32.h blib\lib\Ruby\win32.h
cp Ruby/defines.h blib\lib\Ruby\defines.h
cp Ruby/re.h blib\lib\Ruby\re.h
cp Ruby/st.h blib\lib\Ruby\st.h
cp Ruby/missing.h blib\lib\Ruby\missing.h
cp Ruby/digest.h blib\lib\Ruby\digest.h
cp lib/Ruby.pm blib\lib\Ruby.pm
cp lib/Ruby/literal.pm blib\lib\Ruby\literal.pm
cp Ruby/ruby.h blib\lib\Ruby\ruby.h
cp lib/Ruby/autobox.pm blib\lib\Ruby\autobox.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp  -typemap C:\Perl\lib\ExtUtils\typem
ap -typemap typemap  Ruby.xs &gt; Ruby.xsc &amp;&amp; C:\Perl\bin\perl.exe -MExtUtils::Command -
e "mv" -- Ruby.xsc Ruby.c
C:/Perl/site/bin/gcc.exe -c  -I"C:/Ruby192/lib/ruby/1.9.1/i386-mingw32" -I"C:/Ruby192
/include/ruby-1.9.1" -I"C:/Ruby192/include/ruby-1.9.1/i386-mingw32"     -DNDEBUG -DWI
N32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICI
T_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-st
rict-aliasing -mms-bitfields -O2          -DVERSION=\"0.07\"    -DXS_VERSION=\"0.07\"
  "-IC:\Perl\lib\CORE"  -DMY_RUBY_VERSION="1.9.2" -DMY_RUBY_VERSION_INT="192" Ruby.c
In file included from C:/Perl/lib/CORE/win32thread.h:4,
                 from C:/Perl/lib/CORE/perl.h:2852,
                 from ruby_pm.h:88,
                 from Ruby.xs:5:
C:/Perl/lib/CORE/win32.h:263: warning: useless keyword or type name in empty declarat
ion
C:/Perl/lib/CORE/win32.h:263: warning: empty declaration
C:/Perl/lib/CORE/win32.h:264: warning: useless keyword or type name in empty declarat
ion
C:/Perl/lib/CORE/win32.h:264: warning: empty declaration
In file included from ruby_pm.h:89,
                 from Ruby.xs:5:
C:/Perl/lib/CORE/XSUB.h:513:1: warning: "access" redefined
In file included from C:/Ruby192/include/ruby-1.9.1/ruby/defines.h:205,
                 from C:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:74,
                 from ruby_pm.h:19,
                 from Ruby.xs:5:
C:/Ruby192/include/ruby-1.9.1/ruby/win32.h:197:1: warning: this is the location of th
e previous definition
In file included from ruby_pm.h:89,
                 from Ruby.xs:5:
C:/Perl/lib/CORE/XSUB.h:520:1: warning: "fstat" redefined
In file included from C:/Ruby192/include/ruby-1.9.1/ruby/defines.h:205,
                 from C:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:74,
                 from ruby_pm.h:19,
                 from Ruby.xs:5:
C:/Ruby192/include/ruby-1.9.1/ruby/win32.h:180:1: warning: this is the location of th
e previous definition
Ruby.xs: In function `XS_Ruby__Object_FIRSTKEY':
Ruby.xs:472: warning: use of conditional expressions as lvalues is deprecated
Ruby.xs:472: error: invalid lvalue in assignment
Ruby.xs: In function `XS_Ruby__Object_NEXTKEY':
Ruby.xs:494: warning: use of conditional expressions as lvalues is deprecated
Ruby.xs:494: warning: use of compound expressions as lvalues is deprecated
Ruby.xs:494: error: invalid lvalue in decrement
dmake.exe:  Error code 129, while making 'Ruby.o'
&lt;/code&gt;
&lt;/p&gt;

What I am wondering, is if this is really just a code issue in the XS module? Does anyone else ever use this, or any brand of "inline ruby" style code?  I have looked at the &lt;a href="http://search.cpan.org/~neilw/Inline-Ruby-0.02/lib/Inline/Ruby.pod"&gt;Inline::Ruby&lt;/a&gt; module, but it has even more issues with installation than this one does! (and the docs say it has only been tested on linux)&lt;p&gt;

At the end of the day, I'm really just looking for a simple implementation of inline ruby, so if there is a better/easier/different but equal alternative that I am not considering please suggest it!

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-630086"&gt;
&lt;a href="http://www.perlmonks.org/?node=technojosh"&gt;&lt;i&gt;
-TJ
&lt;/i&gt;
&lt;/a&gt;
&lt;/div&gt;&lt;/div&gt;</field>
</data>
</node>
