Hi there. I get an syntax error on this line (135) when i start my server. I have out-commented the line for now, but would really appreciate any help. [code] error_messages = objects.map {|object| object.errors.full_messages.map {|msg| -- 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 -~----------~----~----~----~------~----~------~--~---
Emil Kampp wrote:> error_messages = objects.map {|object| object.errors.full_messages.map > {|msg|Uh... error_messages = objects.map{|object| object.errors.full_messages.map{|msg| ? I think, if the posted code is _exactly_ what''s in your file, that the Ruby parser cannot bond the second map to the second {. It compiles the equivalent of map;{ - which is a syntax error. -- Phlip http://www.oreillynet.com/ruby/blog/2008/03/beast_acts_as_sphinx.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Phlip wrote:> > I think, if the posted code is _exactly_ what''s in your file, that the > Ruby > parser cannot bond the second map to the second {. It compiles the > equivalent of > map;{ - which is a syntax error. > > -- > Phlip > http://www.oreillynet.com/ruby/blog/2008/03/beast_acts_as_sphinx.htmlThe code is _exactly_ the code in my file. It suddently began failing, for no apparent reason. I did not change this file, i changes something in the collection_select helper, then this error occured while i tried to create a new model from the terminal. I have out-commented it, and now it compiles, but I guess the line _is_ important somewhere, so im reluctant to just keep it uncommented. Can you post your line? So i can copy-paste yours? Perhaps mine have some strange encoded whitespace? - Emil -- 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 -~----------~----~----~----~------~----~------~--~---
On 4 Mar 2008, at 11:50, Emil Kampp wrote:> > Phlip wrote: >> >> I think, if the posted code is _exactly_ what''s in your file, that >> the >> Ruby >> parser cannot bond the second map to the second {. It compiles the >> equivalent of >> map;{ - which is a syntax error. >> >> -- >> Phlip >> http://www.oreillynet.com/ruby/blog/2008/03/beast_acts_as_sphinx.html > > The code is _exactly_ the code in my file. It suddently began failing, > for no apparent reason. I did not change this file, i changes > something > in the collection_select helper, then this error occured while i tried > to create a new model from the terminal. >That code just can''t have ever worked. It looks like it''s missing a second line. Fred> I have out-commented it, and now it compiles, but I guess the line > _is_ > important somewhere, so im reluctant to just keep it uncommented. > > Can you post your line? So i can copy-paste yours? Perhaps mine have > some strange encoded whitespace? > > - Emil > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> > That code just can''t have ever worked. It looks like it''s missing a > second line. > > FredDo you mind posting that line(s) from your file? So i can use those. - Emil -- 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 -~----------~----~----~----~------~----~------~--~---
On 4 Mar 2008, at 16:31, Emil Kampp wrote:> > Frederick Cheung wrote: >> >> That code just can''t have ever worked. It looks like it''s missing a >> second line. >> >> Fred > > Do you mind posting that line(s) from your file? So i can use those. >What file? I''ve been assuming this is something in your app. Fred> - Emil > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> > What file? I''ve been assuming this is something in your app. > > FredNo, it happens in the /usr/local/lib/ruby/gems/1.8/gems/actionpack1.13.5/lib/action_view/helpers/active_record_helper.rb:135 - Emil -- 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 -~----------~----~----~----~------~----~------~--~---