Hello, I have a DB table CREATE TABLE dbo.bookdetails ( id numeric(38,0) NOT NULL, name varchar(2048) NOT NULL, system varchar(2048) NOT NULL, desk varchar(2048) NOT NULL, strategy varchar(2048) NOT NULL, trader varchar(2048) NULL ) I scaffolded it and edited my controller as: def list #@bookdetail_pages, @bookdetails = paginate :bookdetails, :per_page => 10 @books = Bookdetail.find:all render :xml => @books.to_xml end However, when I try to access this page, I get "can''t convert Hash into String" as an error. There is another table in the same db that i scaffold and use in exactly the same manner and it works perfectly. Could someone please point me what I could be doing wrong. Many Thanks, Aman -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This is just a newbie''s attempt to answer, but are any of your fieldnames like "name" or "system" keywords in Ruby or Rails? I tried but couldn''t find a list of keywords anywhere either for Ruby or for Rails. Shauna -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks I found the problem. I could not find "system" listed as a keyword but once I renamed this column, things started working. I just wish RoR could give better warning and error msgs so I could like it even more than I already do. Regards, Aman -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think that''s because system isn''t a Rails reserved word but a Ruby on. It''s Kernel#system. Sometimes it''s easy to forget that Rails isn''t the only factor in RoR. Heh. RSL On 1/18/07, Aman Thind <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Thanks I found the problem. > > I could not find "system" listed as a keyword but once I renamed this > column, things started working. > > I just wish RoR could give better warning and error msgs so I could like > it even more than I already do. > > Regards, > Aman > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Is there a list somewhere of all Ruby keywords and Rails keywords? (Links, please) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2007-Jan-20 02:23 UTC
Re: can''t convert Hash into String
Hi -- On Sat, 20 Jan 2007, Shauna wrote:> Is there a list somewhere of all Ruby keywords and Rails keywords? > (Links, please)The Ruby keywords are in the file ''keywords'' in the Ruby source tree. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/keywords?revision=10397 (and/or somewhere on your system). I''m not sure exactly what constitutes a Rails keyword. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com) --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> The Ruby keywords are in the file ''keywords'' in the Ruby source tree. > http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/keywords?revision=10397 > (and/or somewhere on your system).Thanks, David, that was really helpful. And I''m up to Chapter 9 in your book and loving it. I like your little asides in parentheses (like this) that help clarify and refine your point. I like that thoroughness that addresses all the little possible gotchas (at least all the ones that you could think of). Shauna -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---