Questions tagged [eruby]

eRuby is a templating system that embeds Ruby into a text document. It is popular in HTML documents.

eRuby allows to write Ruby code enclosed by <% and %>. The embedded code blocks are evaluated in-place (and replaced by the result of their evaluation).

36 questions
0
votes
0 answers

NodeJS: any server sided scripting akin to PHP/eRuby?

I can't help but note that no matter how much I google, NodeJS doesn't seem to have any notion of server sided scripting, akin to PHP, eRuby, and what not. That is, embedding code in HTML pages that gets processed before sending the pages to the…
user2503048
  • 1,021
  • 1
  • 10
  • 22
0
votes
1 answer

Vim bad erb indentation

When I tried to indent my .erb file via gg=G, I got this:
  • <%= gravatar_for user, size: 52 %> <%= link_to user.name, user %> <% if current_user.admin? && !current_user?(user) %> | <%= link_to "delete", user, method: :delete, data: { confirm:…
  • user886596
    • 2,380
    • 5
    • 31
    • 53
    0
    votes
    1 answer

    Embedded code in html for a statically typed JIT'ed language possible?

    Would it be possible to design a statically typed JIT'ed language to build a web framework like Ruby on Rails, an attempt to gain the speed of a statically typed language? Embedded Ruby (eRuby) in html is a feature of Ruby on Rails that I don't see…
    user782220
    • 10,677
    • 21
    • 72
    • 135
    0
    votes
    1 answer

    Erubis on Apache httpd.conf and setup?

    I am trying to get Erubis setup to process .rhtml files on an Apache web server. I have Ruby installed (v 1.9.2p290) and I installed Erubis(2.7.0) through Ruby Gems. I can't seem to find the proper way to configure the httpd.conf file -- I found a…
    Thomas
    • 1,069
    • 4
    • 18
    • 40
    -1
    votes
    1 answer

    erb - How to substitute a string (gsub) which contains legit backslashes?

    I had the following problem with erb in combination with Puppet, Hiera and templates: Via Hiera I got the following strings as variables: First the variable example in an array (data[example]) something with _VARIABLE_ in it and variable…
    thonixx
    • 306
    • 1
    • 4
    • 17
    -3
    votes
    1 answer

    says my embedded ruby is nil or empty

    edit page: the first line of embedded ruby is giving me the trouble Edit Post <%= form_for @post do |f|%> (this line is the problem)

    <%= f.label :title %> <%= f.text_field :title%>

    <%= f.label :content %> …

    Nate
    • 1
    • 3
    1 2
    3