Rbplusplus gem problem

Dear all,

I am having some trouble getting the Rbplusplus gem
to work …
I get an uninitialized constant error, which I suspect has something
to do with the sequence of requiring the gems. But I can’t fix it,
since I need the Extension class from the rbplusplus gem:

Ruby code:

require “rubygems”
require ‘rbplusplus’
include RbPlusPlus

working_dir = File.expand_path(File.dirname(FILE) + “/generated”)
p working_dir
Extension.new “first” do |e|
e.sources “one.cpp”
e.working_dir = working_dir

C++ code one.cpp:

#include <stdio.h>

int main()
printf(“This is output from my first program!\n”);
return 0;


$ruby rb.rb
prepare_working_dir': uninitialized constant RbPlusPlus::Extension::FileUtils (NameError) from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/extension.rb:143:inwrite’
initialize' from rb.rb:8:innew’
from rb.rb:8

Thank you for your help,

Best regards,



I’ve got the same bug.
This is resolved by requiring the ‘fileutils’ in extension.rb.

Best regards,

Am 10.05.2008 um 22:49 schrieb Axel E.:

-------- Original-Nachricht --------

Datum: Sun, 11 May 2008 07:17:20 +0900
Von: Thorsten H. [email protected]
An: [email protected]
Betreff: Re: Rbplusplus gem problem

Dear all,

    from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/ 

GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[email protected]


thank you very much!

Best regards,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs