[Nitro] Can nitro be used with eruby?

George Moschovitis george.moschovitis at gmail.com
Sun Jun 11 06:49:28 EDT 2006


nitro provides several replacements for eruby. As a quick tip do the following:

gem install nitro (install nitro)
mkdir mydir
mkdir mydir/public
vi mydir/public/index.xhtml:

      The time now is #{Time.now}

vi mydir/run.rb:

require 'nitro'

cd mydir
ruby run.rb

and point your browser to: localhost:9999

Btw, nitro also alows you to use the <% .. %> syntax like eruby if you
want, but generally we prefer the xhtml compliant syntax:

<?r ... ?>
#{ }


On 6/11/06, Anne G <anne at wjh.harvard.edu> wrote:
> I am a beginner at web programming.
> I have installed eruby, and I am using open-uri to open html
> files and extract information.
> Now, I would like my rhtml file to do different things
> depending on the parameters. So I figured I need a class,
> methods, and a way to link methods to relative links.
> The nitro example hello does just that. I seem to have
> installed nitro ok. But when I add
> <% require 'nitro' %>
> to my
> <% require 'open-uri' %>
> the rhtml crashes. Premature end of script
> Can nitro be used with eruby?
> thanks
> Anne G.
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general


More information about the Nitro-general mailing list