# Development Web Server Producing mal-formed html

**URL:** <https://www.ruby-forum.com/t/development-web-server-producing-mal-formed-html/157767>\
**Category:** Rails\
**Created:** [January 15, 2009, 3:30am UTC](https://www.ruby-forum.com/t/development-web-server-producing-mal-formed-html/157767 "2009-01-15T03:30:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbobker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/73ab20/32.png) [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Post date:** [January 15, 2009, 3:30am UTC](https://www.ruby-forum.com/t/development-web-server-producing-mal-formed-html/157767/1 "2009-01-15T03:30:52Z")

</div>

I am struggling with differing html rendered by my development servers  
on my Ubuntu 8.10 development environment. I have tried the following  
case study with both mongrel and webrick, so I don’t think the problem  
is with the server.

While reducing this problem down to more simple case study would help,  
the following code demonstrates my problem. Essentially, extra html  
tags are being added and items are inserted inside

 tags. I  
imagine that rails rendering is causing this.

A view calls the following partial:

## partial

> To register for a camp, click on the desired time-slot located at the bottom of each camp's description.

 \<% hidden\_div\_if(@cart.items.empty?, :id =\> "cart") do %\> \<%= render(:partial =\> "cart", :object =\> @cart) %\> \<% end %\>

# Register for a Fitness Camp
 \<% @fitness\_camps.each do |fc| %\> \<%= fc.full\_title %\> \<%= "#{fc.description}  
" unless fc.description.nil? -%\> Location: \<%= link\_to fc.location.name\_in\_context, :controller =\> 'location\_info', :action =\> 'description', :id =\> fc.location.id %\>  
 \<% fc.time\_slots.each do |time\_slot| %\> 
 \<% form\_remote\_tag :url =\> { :action =\> :add\_to\_cart, :id =\> time\_slot }, :html =\> {:id =\> "form#{time\_slot.id}"} do %\> \<%= submit\_tag(time\_slot.start\_to\_finish, :id =\> "reg\_#{time\_slot.id}", :class =\> 'button') %\> \<% end # form\_remote\_tag %\> 
 \<% end # time slots iteration %\> 

 eieio \<% end %\> 

## which produces the following html (with the proper html tag

indentation) (note that the test text eieio doesn’t even show up  
below)

# Register for a Fitness Camp
Camp 1 from 15 Mar 09 to 15 Sep 09camp 1 description  
 Location: [Location 1 Description](https://www.ruby-forum.com/location_info/description/1)  

 \<form action="" . . . deleted 

 \<form action= . . . deleted for brevity 

Camp 2 from 15 Dec 08 to 27 Dec 08description for camp 2 . . .  
Location: [Location 1](https://www.ruby-forum.com/location_info/description/1)  

 \<form action= 

 \<form action=". . . deleted for brevity" 

Camp 3 from 14 Dec 08 to 31 Dec 08desc . . .  
 Location: [Location 1](https://www.ruby-forum.com/location_info/description/1)  

 \<form action=". . . .deleted" 

 \<form action="" . . . deleted 

Sorry for all the code, but I wanted to show exactly what was being  
generated. I particularly I am worried about how the

 elements are  
not closing. This is not the case with my production server using  
apache + mongrel. What I suspect is that whatever component of rails  
that is rendering the html is going off on some distracting direction.

Thank you for any help and let me know if this might be a rails bug  
and if I should dig deeper into the rails code.
