search for: eruby

Displaying 20 results from an estimated 102 matches for "eruby".

Did you mean: ruby
2006 Jun 30
2
Eruby.import -> "uninitialized constant" error
I''m working on porting a dynamic website done in PHP over to mod_ruby. I have everything set up and working nicely (I can make a .rhtml page, put ruby code between <% %> and it works etc), but when I try to use "Eruby.import" as a sort of analog to PHP''s "require_once()", I run into trouble. 1) eruby is in my cgi-bin 2) here''s a sample of what I''m trying to do in PHP: require_once(''somedirectory/somefile.php''); 3) here''s a sample of what I...
2007 Apr 03
4
Replacing ERB with Erubis
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.html#topics-rails 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
2010 Apr 06
3
(Rails3-master) erubis: how to use things like preprocessing?
(Rails3 latest git master) Subject says it. I''m trying to figure out how to use erubis features described here: http://www.kuwata-lab.com/erubis/users-guide.05.html#rails, especially preprocessing. My question is, where do I place the Erubis::Helpers::RailsHelper.preprocessing=true Not in application.rb, at that point the object does not exist yet it seems. I wonder why I
2006 Dec 22
2
erubis on rails
Hey, Just thought I''d see how easy it was to use erubis rather than erb in rails, and so far all seems to be pretty easy. Just added a few lines in environment.rb and everything works as before. However, one page is causing a problem. It is a partial that is being passed a local variable. erubis doesn''t seem to see the local, and gives the following error? undefined local
2007 Sep 28
2
RoR uses something rather than erb or eRuby?
it seems that RoR doesn''t use erb or eRuby to generate its output for rhtml? the program erb and the description of eRuby at http://www.eruby.info both said that <% print "foo bar" %> or <% puts "hello" %> will be placed into the output... but currently for RoR, it won''t... only <%= expr...
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other than Erubis are not loaded automatically (Haml, XMLBuilder). Either this should be fixed, or the documentation should be updated to instruct people how to use non-Erb template engines. Apparently the solution is to do something like this in merb_init.rb: ::Merb::AbstractController.register_engine
2005 Apr 08
0
switch mod_ruby to fastcgi but still use eruby?
Hello there list- I have a question I hope someone can answer. I have a Debian server that currently has mod_ruby and eruby installed and working great for the last year or so. I also have one rails app working great on this box. My question is this: I want to switch to fastcgi so i can have more than one rails app, but there are already many scripts using eruby with no framework at all just simple eruby scripts. I...
2010 Nov 20
0
Enabling preprocessing in Erubis makes views much faster
...eval at compile time. Perhaps someone with a deeper knowledge of Rails can say what would be needed to make that work. https://gist.github.com/707461 module ActionView class Base def get_binding;return binding;end end class Template module Handlers class Erubis < ::Erubis::Eruby def add_expr_debug(src, code) src << "@output_buffer.safe_concat(''" << escape_text(eval(code,ActionView::Base.new.get_binding).to_s) << "'');" end end end end end -- You received this message because you...
2006 Dec 20
0
Erubis / Rails Question
I''m trying to figure out whether the fix for an error I get when using Erubis belongs to Erubis or Rails so I can submit a bug/patch/whatever. When you use form_for in an Erubis template the instance_eval uses _erbout instead of _buf. I found the solution [adding ActionView::Base.erb_variable= "_buf" to the setup in app/controllers/application.rb] but in searching out
2006 Jun 22
2
eRuby/erb
Hello. Prospective Mongrel user here. Can Mongrel act as a server for eruby or erb files? Example: <html> <body> <p>The time is <%= Time.now %></p> </body> </html> Pistos
2006 Jun 04
4
eRuby & Rails: Not Compatible
...rror] mod_ruby: /srv/www/htdocs/bget.org/www/aistracking/app/views/client/list.rhtml:5: uninitialized constant #<Module:0x40ab0278>::Client (NameError) [Sun Jun 04 19:13:10 2006] [error] mod_ruby: from (eval):77 [Sun Jun 04 19:13:10 2006] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in `eval_string_wrap'' [Sun Jun 04 19:13:10 2006] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in `run'' [Sun Jun 04 19:13:10 2006] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:72:in `handler'' [Sun Jun 04 19:13:10 2006] [...
2006 Dec 19
7
Improve the rendering speed of rhtml
I found through the log file that the render of the rhtml template would take too much time if there exists ruby code in the rhtml files.In many cases,these ruby code are tied with these rhtml files closely and can not be decoupled from that,therefore,i have a question that,is there exist some way to improve the rendering speed of rhtml when some ruby codes are included? -- Posted via
2010 Nov 05
9
[patch] Let's use <%== %> instead of <%= raw() %>
I''ve submitted a small patch to make Rails behave properly with the Erubis <%== %> construct. For some reason the current behaviour of that tag in Rails 3 is to escape the contents _twice_ which is probably a bug. I offer three suggestions why this is a good idea: - The syntax is cleaner. It can avoid a lot of .html_safe and raw in your views. I especially like the conciseness of
2007 Sep 04
11
returning(...) ?
...e/erubis.rb =================================================================== --- lib/merb/template/erubis.rb (revision 508) +++ lib/merb/template/erubis.rb (working copy) @@ -40,12 +40,12 @@ return @@erbs[path] else begin - returning ::Erubis::MEruby.new(IO.read(path)) do |eruby| - eruby.init_evaluator :filename => path - if cache_template?(path) - @@erbs[path], @@mtimes[path] = eruby, Time.now - end - end + eruby = ::Erubis::MEruby.new(IO.read(path)) +...
2007 Dec 30
2
Loading config YAML into merb process for the life of the process
Hey Chaps, Forgive me for not fully understanding the inner workings of merb, but I would like to read in a YAML configuration file once when the application is booted rather than reading it every time it is used (as presumably the overhead in doing that is significant?) - I had presumed this is how both Merb and rails do it for there database.yml config files (hence its a requirement
2011 Mar 16
19
Uninitialized constant Files::Magick -still around
Hi there, I''m solving the problem about the plugin Magick. In my app in Gemfile I''ve follwoing: require ''rubygems'' require ''mongo'' require ''RMagick'' include Magick and in a model Files: class Files def self.save(upload) ... img = Magick::Image.read(''public/data/nature6.jpg'').first end end
2006 Feb 13
1
Is this same or different
Hi, Is eruby & ruby on rails are same or diffrent. If not same,then what is the diffrence? Please. -- Posted via http://www.ruby-forum.com/.
2011 Sep 19
27
Installing Rails Help!
Hi, I followed a Tutorial on Nettuts to install Ruby with RVM and this went well. I then tried to install Rails to follow the ''How to build a dropbox live service'' from Netttus but appear to get errors can anybody help?. Once I installed rails I created a new rails project using the command (Rails new sharebox -d mysql) This worked and created the folder structure. I then
2011 Oct 30
2
Could not find rails (>= 0) amongst [bundler-1.0.21]
Hello, I''m new to Ruby and unix/linux development (although been building .net apps for years). I''ve almost completed my trek to install Rails ... looks like I have one final hurdle. After installing rails I try the ''rails -v'' command and it fails. Any help here would be deeply appreciated. Here''s the output from my bash session: bash-3.2$ ruby
2006 Aug 18
2
printing out text in .rhtml files
Hi all, In php i can do something like this: <?php print ''hello''; print '' world''; ?> Is there an equivalent to print in eruby, or do I have to use multiple <%= %> lines? Thanks! Jack p.s. I tried posting this before, but I don''t see it. Sorry if this is a repeat. -- Posted via http://www.ruby-forum.com/.