PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Rbplusplus gem problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Rbplusplus gem problem

Réponse
 
LinkBack Outils de la discussion
Vieux 10/05/2008, 21h49   #1
Axel Etzold
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Rbplusplus gem problem

Dear all,

I am having some trouble getting the Rbplusplus gem
http://rbplusplus.rubyforge.org/rbplusplus/
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
end

-------------------------------------------
C++ code one.cpp:

#include <stdio.h>

int main()
{
printf("This is output from my first program!\n");
return 0;
}

-------------------------------------------
Output:

$ruby rb.rb
"/home/axel/rbpp/generated"
/var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/extension.rb:173:in `prepare_working_dir': uninitialized constant RbPlusPlus::Extension::FileUtils (NameError)
from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/extension.rb:143:in `write'
from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/extension.rb:72:in `initialize'
from rb.rb:8:in `new'
from rb.rb:8

Thank you for your ,

Best regards,

Axel




--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx

  Réponse avec citation
Vieux 10/05/2008, 23h17   #2
Thorsten Hater
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rbplusplus gem problem

Hello,

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

Best regards,
Thorsten

Am 10.05.2008 um 22:49 schrieb Axel Etzold:

> Dear all,
>
> I am having some trouble getting the Rbplusplus gem
> http://rbplusplus.rubyforge.org/rbplusplus/
> 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
> end
>
> -------------------------------------------
> C++ code one.cpp:
>
> #include <stdio.h>
>
> int main()
> {
> printf("This is output from my first program!\n");
> return 0;
> }
>
> -------------------------------------------
> Output:
>
> $ruby rb.rb
> "/home/axel/rbpp/generated"
> /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/extension.rb:
> 173:in `prepare_working_dir': uninitialized constant
> RbPlusPlus::Extension::FileUtils (NameError)
> from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/
> extension.rb:143:in `write'
> from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/
> extension.rb:72:in `initialize'
> from rb.rb:8:in `new'
> from rb.rb:8
>
> Thank you for your ,
>
> Best regards,
>
> Axel
>
>
>
>
> --
> GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
>



  Réponse avec citation
Vieux 10/05/2008, 23h42   #3
Axel Etzold
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rbplusplus gem problem


-------- Original-Nachricht --------
> Datum: Sun, 11 May 2008 07:17:20 +0900
> Von: Thorsten Hater <th@tp1.rub.de>
> An: ruby-talk@ruby-lang.org
> Betreff: Re: Rbplusplus gem problem


> Hello,
>
> I've got the same bug.
> This is resolved by requiring the 'fileutils' in extension.rb.
>
> Best regards,
> Thorsten
>
> Am 10.05.2008 um 22:49 schrieb Axel Etzold:
>
> > Dear all,
> >
> > I am having some trouble getting the Rbplusplus gem
> > http://rbplusplus.rubyforge.org/rbplusplus/
> > 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
> > end
> >
> > -------------------------------------------
> > C++ code one.cpp:
> >
> > #include <stdio.h>
> >
> > int main()
> > {
> > printf("This is output from my first program!\n");
> > return 0;
> > }
> >
> > -------------------------------------------
> > Output:
> >
> > $ruby rb.rb
> > "/home/axel/rbpp/generated"
> > /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/extension.rb:
> > 173:in `prepare_working_dir': uninitialized constant
> > RbPlusPlus::Extension::FileUtils (NameError)
> > from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/
> > extension.rb:143:in `write'
> > from /var/lib/gems/1.8/gems/rbplusplus-0.1/lib/rbplusplus/
> > extension.rb:72:in `initialize'
> > from rb.rb:8:in `new'
> > from rb.rb:8
> >
> > Thank you for your ,
> >
> > Best regards,
> >
> > Axel
> >
> >
> >
> >
> > --
> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> > Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
> >

>


Thorsten,

thank you very much!

Best regards,

Axel
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h15.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,67330 seconds with 11 queries