Closed wiemann closed 14 years ago
haven't seen that myself, but will try to take a look later today.
Closing. If anyone can verify please reopen.
Hi, I am facing the issue too. Only in production environment. Works fine in development.
Hi Gaurav,
What version of the gem are you using? There's one for Rails 3 and Rails 2.3.x.
Sorry for the lack of info.. typed it just as i was rushing out. I am using rails 2.3.5. I followed the instructions on the website and it works great on development mode. But yesterday i tried it in production for the first time and it gave this error while trying to display the list of comments associated with a particular model.
The code i was using was straightforward <%@model.comments.each do |comment| %> display code <%end%>
the error was being thrown by the first line as i commented all the display code and checked. Any help is appreciated.
Hey Gaurav,
Sounds like the classes are getting confused somehow between REXML::Comment and top level Comment. Are you using that inside a .xml file?
Hi Jack,
No, I am not using XML anywhere in my project.
Gaurav,
Can you give me some more info:
It's a bit of a challenge for me to figure out what might be going on without seeing it myself, so the more info the more likely I can help.
Thanks.
Gaurav,
I created a 2.3.5 app with the 2.1.1 version of aac and everything works fine in console in production mode. I have to guess that perhaps you're using a later version?
If you want to take a look, I put the app up here: http://github.com/jackdempsey/aac_test
thanks for the quick replies Jack. I am using the plugin. I installed the correct version as per the instructions i the readme file for 2.3.x. Thanks for the tip about testing in console in dev and production. In production mode i get the error when i try to access Model.comments and in development console i do not get the error. I will take a look at the test app that you have put up to see what differences in implementation are there. Once again thanks a lot for the help
If its nay help i am working in windows environment. And this is the error i get in console in production mode
NoMethodError: undefined method quoted_table_name' for REXML::Comment:Class from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record /reflection.rb:187:in
quoted_table_name'
from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record
/associations/has_many_association.rb:92:in construct_sql' from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record /associations/association_collection.rb:21:in
initialize'
from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record
/associations.rb:1300:in new' from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record /associations.rb:1300:in
comments'
from (irb):4
Ahh...Yes, that piece of info helps :-)
This might end up being a windows issue. Try to replicate it in a fork of the aac_test project and I'll see if I can reproduce on os x. If I can't, we might get stuck real soon...
Ok, i just updated a linux machine with my project and tried to run it in production mode. Same error. So i dont think its a OS issue. I noticed that the sample was using the gem. I am using the plugin in the project. Some issue with that?
I'm not sure. Have you tried using it as a gem? That's more the standard/suggested way these days anyway. Give it a go and see what happens.
Hi jack, We finally reached a stage in our project where fixing the comments module was a must do and i took a hard look at our project code and found that a plugin provided by a third party was actually using REXML and had included the rexml module to get out of appending REXML:: to method calls. This was polluting the top level namespace so you were right all along. Thank you so much for all your help and for the wonderful plugin.
Hey Gaurav,
Glad you tracked it down! Can definitely be frustrating when things are mixed in without your knowledge. Good tracking and glad everything's better on your end now.
best, jack
Has anybody seen this issue in the newest version in Rails 2.3.5?
NoMethodError: undefined method `quoted_table_name' for REXML::Comment:Class