# Tips on troubleshooting Rails?

**URL:** <https://www.ruby-forum.com/t/tips-on-troubleshooting-rails/90894>\
**Category:** Rails\
**Created:** [April 2, 2007, 8:18pm UTC](https://www.ruby-forum.com/t/tips-on-troubleshooting-rails/90894 "2007-04-02T20:18:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/dbc845/32.png) [@marko](https://www.ruby-forum.com/u/marko)\
**Post date:** [April 2, 2007, 8:18pm UTC](https://www.ruby-forum.com/t/tips-on-troubleshooting-rails/90894/1 "2007-04-02T20:18:06Z")

</div>

We have an application that worked fine with a previous version of  
Rails (1.1.6). We recently upgraded to ver 1.2.2, and the controller  
handling the XML data stopped working. It seems to crop the data, and  
now we cannot receive data into the application anymore.

What is a recommended way to resolve this issue? Any tips and  
suggestions are greatly welcomed.

---

<div class="post-metadata">

**Author:** ![marko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/dbc845/32.png) [@marko](https://www.ruby-forum.com/u/marko)\
**Post date:** [April 3, 2007, 3:22am UTC](https://www.ruby-forum.com/t/tips-on-troubleshooting-rails/90894/2 "2007-04-03T03:22:11Z")

</div>

marko wrote:

> We have an application that worked fine with a previous version of  
> Rails (1.1.6). We recently upgraded to ver 1.2.2, and the controller  
> handling the XML data stopped working. It seems to crop the data, and  
> now we cannot receive data into the application anymore.
> 
> What is a recommended way to resolve this issue? Any tips and  
> suggestions are greatly welcomed.

Did you get any error message in the log (assuming you are running in  
development mode)? You may try the breakpointer to isolate the  
problematic module.

---

<div class="post-metadata">

**Author:** ![marko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/dbc845/32.png) [@marko](https://www.ruby-forum.com/u/marko)\
**Post date:** [April 4, 2007, 10:13am UTC](https://www.ruby-forum.com/t/tips-on-troubleshooting-rails/90894/3 "2007-04-04T10:13:46Z")

</div>

> Did you get any error message in the log (assuming you are running in  
> development mode)? You may try the breakpointer to isolate the  
> problematic module.
> 
> –  
> Posted viahttp://www.ruby-forum.com/.

Thanks much for asking! This is the message we see:

Processing DataController#post\_test\_result (for 10.139.0.12 at  
2007-03-29 12:02:11) [POST]  
Session ID: 6621ea16007eadec31aca33cb695df58  
Parameters: {“action”=\>“post\_test\_result”, “\<rma\_request\>\n\t  
PostTestResult\n\t \n  
1\n \<!”=\>{}, “controller”=\>“tester/data”}  
FAIL :: build\_xml\_request :: #\<REXML::ParseException: Malformed node  
Line: 1  
Position: 0  
Last 80 unconsumed characters:  
\<!\>  
/usr/local/lib/ruby/1.8/rexml/parsers/baseparser.rb:316:in `pull' /usr/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse’  
/usr/local/lib/ruby/1.8/rexml/document.rb:178:in `build' /usr/local/lib/ruby/1.8/rexml/document.rb:45:in `initialize’  
/home/www/lsapi/rma/config/…/app/controllers/tester/  
xml\_controller.rb:  
24:in `build_xml_request' /home/www/lsapi/rma/config/../app/controllers/tester/ data_controller.rb:9:in `post\_test\_result’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:632:in `call\_filter’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/filters.rb:638:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:438:in `call’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/filters.rb:637:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:619:in `perform\_action\_without\_benchmark’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/benchmarking.rb:66:in  
`perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/benchmarking.rb:66:in  
`perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ action_controller/rescue.rb:83:in `perform\_action’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ action_controller/filters.rb:624:in `process\_without\_session\_management\_support’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/session\_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ action_controller/base.rb:330:in `process’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:41:in  
`dispatch’  
/usr/local/lsws/fcgi-bin/RailsRunner.rb:14  
…  
Malformed node  
Line: 1  
Position: 0  
Last 80 unconsumed characters:  
\<!  
Line: 1  
Position: 0  
Last 80 unconsumed characters:  
\<!  
Completed in 0.02440 (40 reqs/sec) | Rendering: 0.00290 (11%) | DB:  
0.00884 (36%) | 200 OK [[http://our.info/tester/data/post\_test\_result](http://our.info/tester/data/post_test_result)]  
OK [[http://our.info/tester/data/post\_test\_result](http://our.info/tester/data/post_test_result) ]

The weird part is that when it was working, we were accepting XML data  
with no problems. The CDATA was not getting cropped at all… Whereas  
with 1.2.2+, CDATA gets cropped even before we have a chance to do  
anything to it in the controller code.

Parameters: {“action”=\>“post\_test\_result”, “controller”=\>“tester/  
data”, “\<rma\_request\>\n\t PostTestResult\n\t  
\n 1\n \<!  
[CDATA[HEADER\_START\r\nTest Station: Station-1\r\nOperator: joe\r  
\nTest Program Vers: 1.73\r\nScript File: xxxxx\_00\_xx2000\_R1A.TXT\r  
\nScript Rev: 1.00, 03/12/07\r\nTest Date: 03/16/07 11:07:46\r\nUnit  
Serial Number: xxxxx\*\*\*xxxxxx170101\r\nPOWER-UP -  
SSID,----,----,Pass  
\r\n\r\nTEST\_DATA\_END]]\>\n \n\</rma\_request\>”=\>“”}  
Completed in 0.10780 (9 reqs/sec) | Rendering: 0.00076 (0%) | DB:  
0.04805 (44%) | 200
