eruby

Ruby error "Superclass mismatch for class Tempfile"

A while back I migrated a ruby webapp (using eRuby - note: Not Rails) to my new server and in the process it seems to have got broken. I get the error "/usr/lib/ruby/1.8/tempfile.rb:12: superclass mismatch for class Tempfile (TypeError)". I can't see what changed in the migration - all the code stayed exactly the same. I've tried stripp...

Which to use, eruby or erb?

What's the difference between eruby and erb? What considerations would drive me to choose one or the other? My application is generating config files for network devices (routers, load balancers, firewalls, etc.). My plan is to template the config files, using embedded ruby (via either eruby or erb) within the source files to do thing...

Should I use haml or erb or erubis for potentially high traffic site?

I have been playing with Haml recently and really like the way the resulting code looks to me...the developer. I'm also not too worried about a designer being able to consume or change it...we're a small team. That said, beginning work on a project we believe will generate quite a bit of traffic (who doesn't?). I'm concerned that there...

Ruby error "Superclass mismatch for for class Cookie" from cgi.rb

I've just updated my ruby installation on my gentoo server to ruby 1.8.6 patchlevel 287 and have started getting an error on one of my eRuby apps. The error given in the apache error_log file is: [error] mod_ruby: /usr/lib/ruby/1.8/cgi.rb:774: superclass mismatch for class Cookie (TypeError) The strange thing is that it seems to work ...

Under what cirumstances would I need eruby if I'm just doing Ruby programming

As I understand it, eruby is like erb - it lets you stick ruby code into HTML. If someone is using Rails, more than likely they would use erb or Haml. But if I'm not using Rails, under what cirumstances would I need eruby if I'm just doing Ruby programming? I guess I don't understand why someone would need to be outputting HTML if th...

Create your own tags/functions with Erubis

Hi all, I have a ruby class that extends Erubis (a ruby templating engine) and I would like to create my own tags. The following is an example of what i'd like to be reproduce: <%= link_to "/some/url" %> This code should generate a html 'a' tag linking to some url. Now i'd like to be able to create my own tags such as: <%= javascrip...

Good code highlighting, syntax analysis and code assist editor on js.erb and css.erb files

I want to know if there is an api that supports nicely eRuby (erb) and JavaScript highlighting, sintax analysis and code assist. I've already tried Eclipse with Aptana RadRails. Perhaps I'm configuring something wrong, but it guesses that I'm using html.erb on both css.erb and js.erb files. Tried in both windows and linux (Fedora 12). ...

eruby tags nesting?

I'm currently hosted on a Mediatemple gridserver. I'm writing a site to teach myself Ruby - straight ruby, no rails. I've run into a few errors that appear to be a result of nested tags. For example: eruby requires <% %> tags around ruby code. If I try to use erb templating I'm stuffed - <% template = ERB.new <<-EOF The value of x i...