Help me install my own program

Hi y’all:

I’m trying to install my visualruby gem on a windows machine, and I
don’t understand the requirements.

First, I installed ruby’s one click installer ver1.9.2 from here:

Also, I installed glade+GTK+ from this site:

http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/

Then I type:

gem install visualruby

It complains that I need the development package because there is a
problem with “cairo.”

So I went back to the rubyinstaller page, and installed the developent
package using their instructions. It seemed to install successfully.
But now when I try to install the visualruby gem, I get the message:

looking for cairo etc…
extconf.rb failed

I’m trying to update my install instructions, so my program is usable.
It sucks when you can’t even install your own program. Help.
Andrea???

I hope I can have simple install instructions like:

  1. Install glade+GTK+
  2. Install ruby 1 click installer
  3. Install visualruby gem

What am I missing? What is the problem?

Thanks,
Eric

Hi,

In [email protected]
“[ruby-gnome2-devel-en] Help me install my own program” on Fri, 30 Mar
2012 22:21:18 +0200,
“Eric C.” [email protected] wrote:

Then I type:

gem install visualruby

It complains that I need the development package because there is a
problem with “cairo.”

Could you try again the command?
I updated a Windows binary bundled cairo gem. It will solve
your problem.

Thanks,

kou

Thanks for getting back to me kou.

I’m still getting the cairo problem, and its in Windows and Ubuntu.

Here’s the message from ubuntu:

Fetching: vrlib-0.0.31.gem (100%)
Fetching: pkg-config-1.1.3.gem (100%)
Fetching: glib2-1.1.2.gem (100%)
Building native extensions. This could take a while…
Fetching: atk-1.1.2.gem (100%)
Building native extensions. This could take a while…
Building native extensions. This could take a while…
ERROR: Error installing visualruby:
ERROR: Failed to build gem native extension.

    /home/eric/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb

checking for GCC… yes
checking for Win32 OS… no
checking for Mac OS X… no
checking for cairo version (>= 1.2.0)… yes
checking for HAVE_RUBY_ST_H in ruby.h… yes
checking for HAVE_RUBY_IO_H in ruby.h… yes
checking for rb_errinfo() in ruby.h… yes
checking for enum ruby_value_type in ruby.h… yes
creating Makefile

make
compiling rb_cairo_font_options.c
compiling rb_cairo_text_extents.c
compiling rb_cairo_context.c
compiling rb_cairo_scaled_font.c
compiling rb_cairo_font_face.c
compiling rb_cairo_glyph.c
compiling rb_cairo_surface.c
compiling rb_cairo_private.c
compiling rb_cairo_constants.c
rb_cairo_constants.c: In function ‘rb_cairo_operator_from_ruby_object’:
rb_cairo_constants.c:152: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_antialias_from_ruby_object’:
rb_cairo_constants.c:153: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_fill_rule_from_ruby_object’:
rb_cairo_constants.c:154: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_line_cap_from_ruby_object’:
rb_cairo_constants.c:155: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_line_join_from_ruby_object’:
rb_cairo_constants.c:156: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_font_slant_from_ruby_object’:
rb_cairo_constants.c:157: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_font_weight_from_ruby_object’:
rb_cairo_constants.c:158: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_subpixel_order_from_ruby_object’:
rb_cairo_constants.c:159: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_hint_style_from_ruby_object’:
rb_cairo_constants.c:160: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_hint_metrics_from_ruby_object’:
rb_cairo_constants.c:161: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_path_data_type_from_ruby_object’:
rb_cairo_constants.c:162: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_format_from_ruby_object’:
rb_cairo_constants.c:164: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_extend_from_ruby_object’:
rb_cairo_constants.c:165: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_filter_from_ruby_object’:
rb_cairo_constants.c:166: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_svg_version_from_ruby_object’:
rb_cairo_constants.c:168: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function ‘rb_cairo_ps_level_from_ruby_object’:
rb_cairo_constants.c:173: warning: comparison of unsigned expression < 0
is always false
rb_cairo_constants.c: In function
‘rb_cairo_text_cluster_flags_from_ruby_object’:
rb_cairo_constants.c:186: warning: comparison of unsigned expression < 0
is always false
compiling rb_cairo_font_extents.c
compiling rb_cairo_matrix.c
compiling rb_cairo_path.c
compiling rb_cairo_io.c
compiling rb_cairo_region.c
compiling rb_cairo_device.c
compiling rb_cairo_text_cluster.c
compiling rb_cairo_exception.c
rb_cairo_exception.c: In function ‘rb_cairo_check_status’:
rb_cairo_exception.c:195: error: ‘CAIRO_STATUS_LAST_STATUS’ undeclared
(first use in this function)
rb_cairo_exception.c:195: error: (Each undeclared identifier is reported
only once
rb_cairo_exception.c:195: error: for each function it appears in.)
make: *** [rb_cairo_exception.o] Error 1

Gem files will remain installed in
/home/eric/.rvm/gems/ruby-1.9.3-p125/gems/cairo-1.12.0 for inspection.
Results logged to
/home/eric/.rvm/gems/ruby-1.9.3-p125/gems/cairo-1.12.0/ext/cairo/gem_make.out

It must be a problem with the gem because I’m installing glade 3.6.7
which iss an old program, and has worked before. The windows gtk is
also mature.

I’m getting the same error when I just try to install the cairo gem:

gem install cairo

Eric

In [email protected]
“Re: [ruby-gnome2-devel-en] Help me install my own program” on Sat, 31
Mar 2012 06:47:33 +0200,
“Eric C.” [email protected] wrote:

I’m getting the same error when I just try to install the cairo gem:

gem install cairo

Could you install the following gem on Windows?

https://rubygems.org/downloads/cairo-1.12.0-x86-mingw32.gem

Thanks,

kou

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Help me install my own program” on Sat, 31
Mar 2012 06:29:34 +0200,
“Eric C.” [email protected] wrote:

Here’s the message from ubuntu:

rb_cairo_exception.c: In function rb_cairo_check_status:
rb_cairo_exception.c:195: error: CAIRO_STATUS_LAST_STATUS undeclared
(first use in this function)
rb_cairo_exception.c:195: error: (Each undeclared identifier is reported
only once
rb_cairo_exception.c:195: error: for each function it appears in.)
make: *** [rb_cairo_exception.o] Error 1

(Maybe) I fixed the problem.
Could you try the following commands on Ubuntu?

% wget http://pub.cozmixng.org/~kou/archives/cairo-1.12.1.gem
% gem install cairo-1.12.1.gem

Thanks,

kou

Thanks kou!!! You’re a genius!! That fixed the install for cairo on
Ubuntu and Windows.

However, now I’m getting an error when it tries to install psych.

Its saying psych failed to install, checking for yaml.h …no!

So the yaml.h is missing due to not having libyaml (???) installed?

I could probibly try to fix this but I’m going to need to understand
what’s going on to write my install instructions. Does anyone know what
this means? I know that when I use rubygems api to install gems, it
breaks due to a bug in yaml. Installing psych fixes the bug.