Forum: Ruby on Rails Replacing ERB with Erubis

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Marston A. (Guest)
on 2007-04-03 16:50
(Received via mailing list)
Hey guys,

I've been hearing a lot about erubis: http://www.kuwata-lab.com/erubis/
Especially about how much faster it is than straight ERB.

In their Ruby on Rails support docs:
http://www.kuwata-lab.com/erubis/users-guide.05.ht...
They state that with a few added lines to your environment.rb it will
replace ERB completely.

I'm wondering if anyone has done this in an existing application and
if there are any existing ERB area's this might break.  I'd also like
to hear anyone's experience with Erubis in general.  Thanks.
James S. (Guest)
on 2007-04-03 17:21
(Received via mailing list)
On Apr 3, 2007, at 8:49 AM, Marston A. wrote:
> if there are any existing ERB area's this might break.  I'd also like
> to hear anyone's experience with Erubis in general.  Thanks.

I wrote up some notes on my experiences a couple of months ago:

http://jystewart.net/process/2007/02/speeding-up-r...

As I understand it the compatibility issues that were a problem
earlier on are now resolved. I know I've not had any problems.

James.

--
James S.
Play: http://james.anthropiccollective.org
Work: http://jystewart.net/process/
Marston A. (Guest)
on 2007-04-04 11:06
(Received via mailing list)
James,

Thanks, I'll check out your writeup.  Overall this looks like a good
drop-in solution (assuming those issues were fixed).  Can't beat a 3x
speed increase! :-)
Jason R. (Guest)
on 2007-04-04 17:03
(Received via mailing list)
Curious about the proposed patch: How does moving object instantiation
into
a separate method increase speed? Unless I'm actually blind, the patch
on
this page
(http://www.kuwata-lab.com/erubis/users-guide.05.ht...)
would do nothing for increasing speed.

Is there something monkey patched in that take advantage of this change?

Jason
Jason R. (Guest)
on 2007-04-04 17:18
(Received via mailing list)
Just checked out erubis. The newest version does the patch for you
(check
out rails_helper.rb).
This topic is locked and can not be replied to.