Showing posts with label ruby. Show all posts
Showing posts with label ruby. Show all posts

Monday, November 28, 2011

ruby-debug on 1.9.3 (Windows)

Couldn't get the gems installed yet:

>gem install ruby-debug-base19 --version=0.11.26 -- --configure-options --with-ruby-include="C:\PROGRA~2\Ruby\1.9.3-p0\include\ruby-1.9.1\ruby-1.9.3-p0"
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-base19:
        ERROR: Failed to build gem native extension.

        C:/PROGRA~2/Ruby/1.9.3-p0/bin/ruby.exe extconf.rb --configure-options --with-ruby-include=C:\PROGRA~2\Ruby\1.9.3-p0\include\ruby-1.9.1\ruby-1.9.3-p0
checking for rb_method_entry_t.called_id in method.h... yes
checking for vm_core.h... yes
checking for iseq.h... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
checking for eval_intern.h... yes
checking for struct iseq_line_info_entry in vm_core.h,iseq.h... no
checking for struct iseq_insn_info_entry in vm_core.h,iseq.h... yes
checking for if rb_iseq_compile_with_option was added an argument filepath... yes
creating Makefile

make
generating ruby_debug-i386-mingw32.def
compiling breakpoint.c
breakpoint.c:3:21: fatal error: vm_core.h: No such file or directory
compilation terminated.
make: *** [breakpoint.o] Error 1


Gem files will remain installed in C:/PROGRA~2/Ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.26 for inspection.
Results logged to C:/PROGRA~2/Ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.26/ext/ruby_debug/gem_make.out

Luis Lavena lent me a hand on this, but that couldn't solve the problem.

Update: Moving your Ruby installation to a path without spaces fixes the problem. I thought PROGRA~2 could work just find. Thanks Luis once again.

Friday, January 4, 2008

Back to Maven, No to Raven and BuildR

One of the TODOs I set for this year is to find out more about Raven -- a Java build tool written in Ruby. The rationale behind such tool is that it provides you with a full scripting environment, unlike the XML-config-based Ant and Maven. With that, you won't miss any tiny single things that you need for your build -- it can go beyond the boundaries. With the latter, you will have to write Ant task or Mojo (do you miss Jelly?).

Half way through, I switched to BuildR -- just another build system written in Ruby, an Apache incubator project. One of the similarities of Raven and BuildR is they are both written on top of Rake -- the Ruby 'Make'. I found it out from the source of Apache Ode actually.

I have gone through some pain in the past 3 days in converting one of my projects (the Mule JXTA transport) from Maven 2 (pom.xml) to BuildR (Rakefile), such as,
  • Couldn't to connect to the project's repository, as HTTPS and Basic AUTH are unsupported. I have submitted a patch to the BuildR folks at BUILDR-14.
  • Couldn't get my existing test cases to run, BuildR only considers "Test*" and "*Test" cases as valid JUnit test cases. You can fix this by modifying the test.rb of it.
  • Transitive dependency management! People love and hate Maven because of this feature. It is currently not supported by BuildR 1.x (scheduled in 2.x I guess). And has Raven implemented it? I'm not sure but I came through an interesting blog by Matthieu Riou which concludes to add this feature into Raven. Without it, I had to fill in all the dependencies into my Rakefile by referring to the classpath files generated by Maven. How ironic.
IMO, these Ruby build tools are not as mature as Maven and it requires more scripting work to do what Maven can do for me at this stage, e.g. assembly, release, etc. I will also quote what David told me, which makes a lot of sense but could be controversial especially to some Makefile/Rakefile folks:

"Why do you have to write code to build your code? You will end up doing more debugging."


So that's a no-no. The de-facto build tool has got to be Maven.

- yc