search for: erb

Displaying 20 results from an estimated 1382 matches for "erb".

Did you mean: eb
2007 May 04
3
fileserver hanging
....rb:344:in `run'' from /usr/sbin/puppetd:424 server side: info: Found test.dmz.ciphirelabs.net in /etc/puppet/manifests/site.pp info: Found base_node in /etc/puppet/manifests/site.pp info: Found true_base in /etc/puppet/manifests/site.pp debug: apt: Retrieving template sources.list.erb debug: template[/var/lib/puppet/templates/sources.list.erb]: Interpolated template /var/lib/puppet/templates/sources.list.erb in 0.00 seconds debug: update-check: Retrieving template update_check.pl.erb debug: template[/var/lib/puppet/templates/update_check.pl.erb]: Interpolated template /var/lib/p...
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for suppressing trailing newlines. Thus erb -n script gives errors. Where is Rails ERB so I can invoke it directly? Thank you Hugh
2006 Jul 25
3
about ERB sample
Hi list: I run the ri''s ERB doc 1st sample 1. require ''erb'' 2. x = 42 3. template = ERB.new <<-EOF 4. The value of x is: 5. EOF 6. puts template.result(binding) the doc say it will print "The value of x is: 42" but my irb print "nil&q...
2011 Nov 18
2
Are tildes actually valid in templates or is this a bug?
Hi all, First off, we''re running Puppet 2.7.6 with Ruby 1.8.7 on CentOS 6.0. Now, I''m using tildes in a template to prevent newlines from appearing but ruby/puppet is choking on them. */tmp/puppet$ cat test.erb* Line 1: Line 2 will exist if running on CentOS. <% if operatingsystem == "CentOS" ~%> Line 2: Yay, we''re running CentOS. <% end ~%> */tmp/puppet$ erb -x -T ''-'' test.erb | ruby -c* -:2: syntax error, unexpected ''~'', expecting kTHEN...
2007 Jan 19
4
Rendering with erb
Hi, I thought it would be fun to try to write a render method that uses erb for rending. I''m not much of a programmer, but I still like to try: module Test require ''erb'' def render(m) ERB.new(IO.read("templates/layout.html")).result(binding) do ERB.new(IO.read("templates/#{m}.html")).result(binding) end e...
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
When I run my functional tests, they throw an error with the following message: ActionView::TemplateError: Missing template /_captcha.erb in view path app/views:test/vendor/plugins/brain_buster/views/brain_busters On line #23 of app/views/contacts/_form.html.erb 20: <%= f.label :message %><br /> 21: <%= f.text_area :message %> 22: </div> 23: <%= render :parti...
2009 Aug 27
8
Adding New Column
I added a new column using a migration. Once I updated the new.html.erb, edit.html.erb, show.html.erb, and the index.html.erb I brought up my web pages. There was a field to update show. I tried the update and the it was successful but the update did not show up in any of the other pages. What did I miss? I am using 2.3.3 of ror.
2009 Oct 20
10
REXML
Hi, How to embed ruby code in xml . here is my XML template : string = <<EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ozxmlscene> <ozml version="4.0"> <styleRun style="1091379" offset="0" length="7"/> <text>The End</text> <object value="84"/> <object
2006 Apr 25
5
markaby or erb?
Guys, We''re embarking on a new dev project, and I''m curious....why would one choose markaby over erb? I for one am no fan of the erb syntax, but aside from that it''s similar to other technologies I''ve used in the past: PHP, JSP, ASP, etc. Why would one choose markaby over erb? What are the benefits? What are the drawbacks? Is there anything remarkable one can do that the o...
2011 Oct 18
2
Puppet node fails to pass facts to master
...e, and I signed it on the puppetmaster. For the following logs extract I ve replaced the FQDN of my node by puppet.example.com. When doing a puppet run I am getting the following error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template linux/dput.cf.erb: Could not find value for ''lsbdistid'' at 2:/etc/puppet/modules/linux/templates/ dput.cf.erb at /etc/puppet/modules/linux/manifests/dput.pp:7 on node puppetnode.example.com The line in dput.cf.erb is this one: # packages for <%= lsbdistid %> to a private repository (not the...
2007 Sep 29
1
templates with same name before extension are cached
Hi all, I was just wondering if this is the intended behavior. Here is my setup: controller def index respond_to do |f| f.xml { render :xml => true } f.html { render :layout => :none } end end In my views I have a file for each type index.herb index.xerb The first request I send is cached and interferes with the other one. For example, if I send an xml request first, followed by html, here is what I see (those are just some debug statements I put in to follow the code) Request 1 "Accept: text/xml" - "starting find_templ...
2009 Jan 20
5
Problem running rake test
...aller, everything has been working fine up till now, when i want to start getting into testing, i got this error, any reason why? C:/Ruby/bin/ruby -Ilib;test "C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/ lib/rake/rake_test_loader.rb" "test/unit/word_test.rb" C:/Ruby/lib/ruby/1.8/erb.rb:469:in `scan'': You have a nil object when you didn''t expect it! (NoMethodError) You might have expected an instance of Array. The error occurred while evaluating nil.empty? from C:/Ruby/lib/ruby/1.8/erb.rb:525:in `compile'' from C:/Ruby/lib/ruby/1.8/erb....
2010 Jul 02
17
Doesn't work erb engine
I''m new in RoR:) I have controller and view (/app/controllers/greeting_controller.rb and /app/views/greeting/index.rhtml /.erb/.html.erb - doesn''t match). greeting_controller.rb source: class GreetingController < ApplicationController def index @message = "Hello world!" end end index.rhtml source: <html> <head><title>test</title></head> <body> <p><...
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 &lt...
2006 Feb 07
4
__END__ equivalent for erb?
Time and time again I find the need to terminate evaluation of an erb file on a certain line for debugging purposes, but can''t figure out a way to do it. Is this possible? Thanks! John -- Posted with http://DevLists.com. Sign up and save your time!
2010 Aug 06
0
adding options to erb scaffold generator to include or skip custom views / templates
created a small patch.. looking for feedback / etc.. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5319-adding-options-to-erb-scaffold-generator-to-include-or-skip-custom-views-templates#ticket-5319-2 When I was working on customizing the erb scaffold generator to match the style and design I wanted to use by creating custom templates in / lib/templates/erb/scaffold I found that I wanted to add additional files. I can n...
2010 Apr 19
3
which views are rendered for an URL
Hi, Is there a way I can figure out which files are run for a specific URL? Given http://www.planet.com/countries files like: countries/ index.html.erb, countries/_country.html.erb, layouts/ application.html.erb and so on. Thank You -- M. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@publi...
2010 Jul 06
2
%% in templates
Hiya, I''ve recently updated my svn server so that it checks the syntax of .erb files, on commit, along with .pp files. While doing this, I ran across a small but niggling issue and wanted to see if I was just doing something wrong or if it was a bug. In my sudoers template file, I have a number of lines that start along the lines of: %sup ALL=NOPASSWD: ALL %mon ALL=N...
2006 Aug 28
10
Templates and arrays
I''m in the process of documenting templates right now, and I figured I should see what happens when you use them with arrays: $ cat ~/bin/test.pp $values = [this, is, an, array, of, values] $content = template("/tmp/templates/testing.erb") file { "/tmp/temtest": content => $content } $ cat /tmp/templates/testing.erb <% values.each do |val| %> I got <%= val %> from you! <% end %> $ puppet -v ~/bin/test.pp notice: //file=/tmp/temtest/content: synced $ cat /tmp/temtest I got this from...
2012 May 21
4
Rendering partial views with ajax calls in rails 3.1
...controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do |format| format.html #show.html format.js format.json { render :json => @host } end end And the respective template (show.js.erb): $(''#tabs-1'').html("<%= escape_javascript(render @host) %>"); And a partial file named _host.html.erb All this works fine. The template "_host.html.erb" is rendered in div tabs-1, but now i need to add some other partial template to a different id...