Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [Nitro] public root

Reply
Thread Tools

[Nitro] public root

 
 
Denis Nikiforov
Guest
Posts: n/a
 
      05-11-2006
(transmit-message (Hello *All*)
(Say '(

My apache' DocumentRoot looks like /my/home/folder/site/www/. Nitro is
placed in /my/home/folder/site/www/path/to/nitro/.

How must I configure Nitro?

I'd placed this dirty hack into my run.rb:

,----[ run.rb ]
| if ENV["REQUEST_URI"] =~ /^\/path\/to\/nitro\/public\//
| ENV["REQUEST_URI"]=ENV["REQUEST_URI"].sub('/path/to/nitro/public/', '/')
| BASE_URI = '/path/to/nitro/public'
| else
| BASE_URI = ''
| end
|
| class BaseURIMorpher < Morpher
| def before_start(buffer)
| if @attributes['href']
| if @attributes['href'] =~ /^\//
| @attributes['href'] = BASE_URI + @attributes['href']
| elsif @attributes['href'] =~ /^http:\/\//
| @attributes['href']
| else
| @attributes['href'] = BASE_URI + '/' + @attributes['href']
| end
| end
| if @attributes['action']
| if @attributes['action'] =~ /^\//
| @attributes['action'] = BASE_URI + @attributes['action']
| else
| @attributes['action'] = BASE_URI + '/' + @attributes['action']
| end
| end
| end
| end
|
| Morphing.add_morpher :href, BaseURIMorpher
| Morphing.add_morpher :action, BaseURIMorpher
`----

But it's too ugly and buggy ;( Actually, it doesn't work for forms
generated with form_for.

--
))) => t
 
Reply With Quote
 
 
 
 
Aemca
Guest
Posts: n/a
 
      05-11-2006
You might want to try the nitro mailinglist.

http://rubyforge.org/pipermail/nitro-general/

http://rubyforge.org/mailman/listinfo/nitro-general


"Denis Nikiforov" <> wrote in message
news:...
> (transmit-message (Hello *All*)
> (Say '(
>
> My apache' DocumentRoot looks like /my/home/folder/site/www/. Nitro is
> placed in /my/home/folder/site/www/path/to/nitro/.
>
> How must I configure Nitro?
>
> I'd placed this dirty hack into my run.rb:
>
> ,----[ run.rb ]
> | if ENV["REQUEST_URI"] =~ /^\/path\/to\/nitro\/public\//
> | ENV["REQUEST_URI"]=ENV["REQUEST_URI"].sub('/path/to/nitro/public/',
> '/')
> | BASE_URI = '/path/to/nitro/public'
> | else
> | BASE_URI = ''
> | end
> |
> | class BaseURIMorpher < Morpher
> | def before_start(buffer)
> | if @attributes['href']
> | if @attributes['href'] =~ /^\//
> | @attributes['href'] = BASE_URI + @attributes['href']
> | elsif @attributes['href'] =~ /^http:\/\//
> | @attributes['href']
> | else
> | @attributes['href'] = BASE_URI + '/' + @attributes['href']
> | end
> | end
> | if @attributes['action']
> | if @attributes['action'] =~ /^\//
> | @attributes['action'] = BASE_URI + @attributes['action']
> | else
> | @attributes['action'] = BASE_URI + '/' + @attributes['action']
> | end
> | end
> | end
> | end
> |
> | Morphing.add_morpher :href, BaseURIMorpher
> | Morphing.add_morpher :action, BaseURIMorpher
> `----
>
> But it's too ugly and buggy ;( Actually, it doesn't work for forms
> generated with form_for.
>
> --
> ))) => t



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSE 4 11-15-2006 02:40 AM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola Microsoft Certification 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSD 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd realexxams@yahoo.com Microsoft Certification 0 05-10-2006 02:35 PM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57