Syntaxerror while starting server

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|

Emil K. 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
O'Reilly Media - Technology and Business Training

On 4 Mar 2008, at 11:50, Emil K. wrote:


Phlip
O'Reilly Media - Technology and Business Training

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

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
O'Reilly Media - Technology and Business Training

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.

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

On 4 Mar 2008, at 16:31, Emil K. wrote:

Frederick C. 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

Frederick C. wrote:

What file? I’ve been assuming this is something in your app.

Fred

No, 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

Frederick C. 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.

  • Emil