[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Configuring eruby with apache

Eric DUMINIL

7/15/2006 12:01:00 AM

Hi everybody!

Sorry if this not the right place to post, please tell me where I
should ask such a question if it's not the right place to post here.

I just would like to enable .rhtml files to be automatically converted
by eruby using apache2, but I didn't managed to do it so far.
How did you succeed in doing so?
I use Ubuntu 6.06, with
eruby 1.0.5-1
libapache2-mod-ruby 1.2.5-1
ruby1.8.4
apache2 2.0.55

Any success story corresponding to my configuration?

Thanks for your attention,

Eric.

6 Answers

Justin Collins

7/15/2006 12:10:00 AM

0

Eric DUMINIL wrote:
> Hi everybody!
>
> Sorry if this not the right place to post, please tell me where I
> should ask such a question if it's not the right place to post here.
>
> I just would like to enable .rhtml files to be automatically converted
> by eruby using apache2, but I didn't managed to do it so far.
> How did you succeed in doing so?
> I use Ubuntu 6.06, with
> eruby 1.0.5-1
> libapache2-mod-ruby 1.2.5-1
> ruby1.8.4
> apache2 2.0.55
>
> Any success story corresponding to my configuration?
>
> Thanks for your attention,
>
> Eric.
>
Have you set up your httpd2.conf file?

First, there has to be this up with the other modules:

LoadModule ruby_module /usr/lib/apache2/mod_ruby.so


Then, below, there is something like:

<IfModule mod_ruby.c>

#lots of other stuff here
#just showing the stuff for .rhtml files

# # for Apache::ERubyRun
RubyRequire apache/eruby-run
# handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>

</IfModule>



Does that help?

-Justin

Mat Schaffer

7/15/2006 3:41:00 AM

0

On Jul 14, 2006, at 8:09 PM, Justin Collins wrote:
> Eric DUMINIL wrote:
>> [snip: setting up eruby]
>>
> Have you set up your httpd2.conf file?
>
> First, there has to be this up with the other modules:
>
> LoadModule ruby_module /usr/lib/apache2/mod_ruby.so
>
>
> Then, below, there is something like:
>
> <IfModule mod_ruby.c>
>
> #lots of other stuff here
> #just showing the stuff for .rhtml files
>
> # # for Apache::ERubyRun
> RubyRequire apache/eruby-run
> # handle *.rhtml as eruby files.
> <Files *.rhtml>
> SetHandler ruby-object
> RubyHandler Apache::ERubyRun.instance
> </Files>
>
> </IfModule>
>
>
>
> Does that help?
>
> -Justin

Also, if you get that running, I really like that you can plunk this
into a .htaccess file and get exception traces:

<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyDebug.instance
</Files>

Yay simplicity. Now if only dealing with headers/cookies and the
like were easier from within Apache/eRuby...
-Mat



Eric DUMINIL

7/15/2006 10:05:00 AM

0

Thanks a lot for your reply Justin!
(and thank you too Mat, but I cannot try your tip yet)

So, I tried to modify http.conf by adding:

###########################################################
LoadModule ruby_module /usr/lib/apache2/modules/mod_ruby.so
<IfModule mod_ruby.c>
# # for Apache::ERubyRun
RubyRequire apache/eruby-run
# handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>
###########################################################

And then,

$ sudo /etc/init.d/apache2 force-reload
* Forcing reload of apache 2.0 web server...
[Fri Jul 14 18:36:45 2006] [warn] module ruby_module is already loaded,
skipping
[Fri Jul 14 18:36:47 2006] [warn] module ruby_module is already loaded,
skipping
[ ok ]

Indeed, I already enabled ruby_module by using
$ a2enmod ruby

So I removed the link "/etc/apache2/mods-enabled/ruby"
and reloaded apache2, without warning this time.

But now, when I try to view a .rhtml file, my browser only asks me if I want
to download this file or open it with a text editor. :-/


Thanks again for your help,

Eric









Am Samstag, 15. Juli 2006 02:09 schrieb Justin Collins:
> Eric DUMINIL wrote:
> > Hi everybody!
> >
> > Sorry if this not the right place to post, please tell me where I
> > should ask such a question if it's not the right place to post here.
> >
> > I just would like to enable .rhtml files to be automatically converted
> > by eruby using apache2, but I didn't managed to do it so far.
> > How did you succeed in doing so?
> > I use Ubuntu 6.06, with
> > eruby 1.0.5-1
> > libapache2-mod-ruby 1.2.5-1
> > ruby1.8.4
> > apache2 2.0.55
> >
> > Any success story corresponding to my configuration?
> >
> > Thanks for your attention,
> >
> > Eric.
>
> Have you set up your httpd2.conf file?
>
> First, there has to be this up with the other modules:
>
> LoadModule ruby_module /usr/lib/apache2/mod_ruby.so
>
>
> Then, below, there is something like:
>
> <IfModule mod_ruby.c>
>
> #lots of other stuff here
> #just showing the stuff for .rhtml files
>
> # # for Apache::ERubyRun
> RubyRequire apache/eruby-run
> # handle *.rhtml as eruby files.
> <Files *.rhtml>
> SetHandler ruby-object
> RubyHandler Apache::ERubyRun.instance
> </Files>
>
> </IfModule>
>
>
>
> Does that help?
>
> -Justin

Eric DUMINIL

7/15/2006 11:25:00 AM

0

Ok!

I found the solution :-)

I removed
<IfModule mod_ruby.c>
# # for Apache::ERubyRun
RubyRequire apache/eruby-run
# handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>

from httpd.conf
and replaced it with:

###########################
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby /cgi-bin/eruby
###########################

Then
sudo a2enmod ruby actions
made the rest.

Thanks for your help!

Eric

PS : any clue why my posts are always doubled????


Am Samstag, 15. Juli 2006 12:05 schrieb Éric DUMINIL:
> Thanks a lot for your reply Justin!
> (and thank you too Mat, but I cannot try your tip yet)
>
> So, I tried to modify http.conf by adding:
>
> ###########################################################
> LoadModule ruby_module /usr/lib/apache2/modules/mod_ruby.so
> <IfModule mod_ruby.c>
> # # for Apache::ERubyRun
> RubyRequire apache/eruby-run
> # handle *.rhtml as eruby files.
> <Files *.rhtml>
> SetHandler ruby-object
> RubyHandler Apache::ERubyRun.instance
> </Files>
> </IfModule>
> ###########################################################
>
> And then,
>
> $ sudo /etc/init.d/apache2 force-reload
> * Forcing reload of apache 2.0 web server...
> [Fri Jul 14 18:36:45 2006] [warn] module ruby_module is already loaded,
> skipping
> [Fri Jul 14 18:36:47 2006] [warn] module ruby_module is already loaded,
> skipping
> [ ok ]
>
> Indeed, I already enabled ruby_module by using
> $ a2enmod ruby
>
> So I removed the link "/etc/apache2/mods-enabled/ruby"
> and reloaded apache2, without warning this time.
>
> But now, when I try to view a .rhtml file, my browser only asks me if I
> want to download this file or open it with a text editor. :-/
>
>
> Thanks again for your help,
>
> Eric
>
> Am Samstag, 15. Juli 2006 02:09 schrieb Justin Collins:
> > Eric DUMINIL wrote:
> > > Hi everybody!
> > >
> > > Sorry if this not the right place to post, please tell me where I
> > > should ask such a question if it's not the right place to post here.
> > >
> > > I just would like to enable .rhtml files to be automatically converted
> > > by eruby using apache2, but I didn't managed to do it so far.
> > > How did you succeed in doing so?
> > > I use Ubuntu 6.06, with
> > > eruby 1.0.5-1
> > > libapache2-mod-ruby 1.2.5-1
> > > ruby1.8.4
> > > apache2 2.0.55
> > >
> > > Any success story corresponding to my configuration?
> > >
> > > Thanks for your attention,
> > >
> > > Eric.
> >
> > Have you set up your httpd2.conf file?
> >
> > First, there has to be this up with the other modules:
> >
> > LoadModule ruby_module /usr/lib/apache2/mod_ruby.so
> >
> >
> > Then, below, there is something like:
> >
> > <IfModule mod_ruby.c>
> >
> > #lots of other stuff here
> > #just showing the stuff for .rhtml files
> >
> > # # for Apache::ERubyRun
> > RubyRequire apache/eruby-run
> > # handle *.rhtml as eruby files.
> > <Files *.rhtml>
> > SetHandler ruby-object
> > RubyHandler Apache::ERubyRun.instance
> > </Files>
> >
> > </IfModule>
> >
> >
> >
> > Does that help?
> >
> > -Justin

Justin Collins

7/15/2006 7:45:00 PM

0

Éric DUMINIL wrote:
> Ok!
>
> I found the solution :-)
>
Glad you got it working, I'm not an expert on it or anything :)

> Thanks for your help!
>
> Eric
>
> PS : any clue why my posts are always doubled????
>
>

They aren't really doubled, they just look that way in gmail.


-Justin


> Am Samstag, 15. Juli 2006 12:05 schrieb Éric DUMINIL:
>
>> Thanks a lot for your reply Justin!
>> (and thank you too Mat, but I cannot try your tip yet)
>>
>> So, I tried to modify http.conf by adding:
>>
>> ###########################################################
>> LoadModule ruby_module /usr/lib/apache2/modules/mod_ruby.so
>> <IfModule mod_ruby.c>
>> # # for Apache::ERubyRun
>> RubyRequire apache/eruby-run
>> # handle *.rhtml as eruby files.
>> <Files *.rhtml>
>> SetHandler ruby-object
>> RubyHandler Apache::ERubyRun.instance
>> </Files>
>> </IfModule>
>> ###########################################################
>>
>> And then,
>>
>> $ sudo /etc/init.d/apache2 force-reload
>> * Forcing reload of apache 2.0 web server...
>> [Fri Jul 14 18:36:45 2006] [warn] module ruby_module is already loaded,
>> skipping
>> [Fri Jul 14 18:36:47 2006] [warn] module ruby_module is already loaded,
>> skipping
>> [ ok ]
>>
>> Indeed, I already enabled ruby_module by using
>> $ a2enmod ruby
>>
>> So I removed the link "/etc/apache2/mods-enabled/ruby"
>> and reloaded apache2, without warning this time.
>>
>> But now, when I try to view a .rhtml file, my browser only asks me if I
>> want to download this file or open it with a text editor. :-/
>>
>>
>> Thanks again for your help,
>>
>> Eric
>>
>> Am Samstag, 15. Juli 2006 02:09 schrieb Justin Collins:
>>
>>> Eric DUMINIL wrote:
>>>
>>>> Hi everybody!
>>>>
>>>> Sorry if this not the right place to post, please tell me where I
>>>> should ask such a question if it's not the right place to post here.
>>>>
>>>> I just would like to enable .rhtml files to be automatically converted
>>>> by eruby using apache2, but I didn't managed to do it so far.
>>>> How did you succeed in doing so?
>>>> I use Ubuntu 6.06, with
>>>> eruby 1.0.5-1
>>>> libapache2-mod-ruby 1.2.5-1
>>>> ruby1.8.4
>>>> apache2 2.0.55
>>>>
>>>> Any success story corresponding to my configuration?
>>>>
>>>> Thanks for your attention,
>>>>
>>>> Eric.
>>>>
>>> Have you set up your httpd2.conf file?
>>>
>>> First, there has to be this up with the other modules:
>>>
>>> LoadModule ruby_module /usr/lib/apache2/mod_ruby.so
>>>
>>>
>>> Then, below, there is something like:
>>>
>>> <IfModule mod_ruby.c>
>>>
>>> #lots of other stuff here
>>> #just showing the stuff for .rhtml files
>>>
>>> # # for Apache::ERubyRun
>>> RubyRequire apache/eruby-run
>>> # handle *.rhtml as eruby files.
>>> <Files *.rhtml>
>>> SetHandler ruby-object
>>> RubyHandler Apache::ERubyRun.instance
>>> </Files>
>>>
>>> </IfModule>
>>>
>>>
>>>
>>> Does that help?
>>>
>>> -Justin
>>>
>
>

dsharavi

3/25/2011 8:22:00 PM

0

On Mar 25, 12:25 am, HHW <coaster132...@yahoo.com> wrote:
> On Mar 22, 7:50 pm, drahcir <s...@sgscc.com> wrote:
> > >Do you have a Rabbi?
>
> > Yes. I asked him about you. He said I should help you in any way I
> > can. He said that the first step in solving a problem is facing it. So
> > here, face your problem:
>
> >http://groups.google.com/group/soc.culture.jewish/msg/acc202...
>
> > I realize that you have "little to know idea" how to begin to solve
> > this. I tell you what. Next time, just invite me to your "fete
> > accompli" and I'll take it easy on you, ok? I may then be in such a
> > good mood, I won't post "an url".

> A Jew admits: Jews invent enemies
>
> This very revealing Jerusalem Post Jewish World Article, written by
> the Jew Joseph Aaron, was published on the Internet on July 4, 2000.
> Underlines have been added by Radio Islam.

Underlines by........ROTFLOL

Next thing you know, Hunter will be citing Jewish History based on his
old copy of the History of the Jews, written by Adolf Eichmann, with
Forwards by Adolf Hitler and Amin al-Husayni, and Afterward by Yasir
Arafat.

Deborah