When I try to run my rails project, I get a message that there is a syntax error and the application cannot compile (see below). However, it does not tell me which file has this error. So instead of saying "(index.erb):56: syntax error, unexpected $end, expecting '')''" it just has (erb) where it should provide a filename. Can someone provide some pointers to help me narrow the field a bit? ERROR MESSAGE: ------------------------------------------------------------------------------------------------------ Fast Debugger (ruby-debug-ide 0.4.9) listens on :xxxx => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 (erb):56 Uncaught exception: compile error (erb):56: syntax error, unexpected $end, expecting '')'' ; _erbout ^ ------------------------------------------------------------------------------------------------------ Thanks for any assistance you can offer! -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Feb-26 09:49 UTC
Re: Rails Project Won''t Compile - No Detailed Errors - Help!
On Feb 26, 12:37 am, noname <informzoo.ad...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When I try to run my rails project, I get a message that there is a > syntax error and the application cannot compile (see below). However, > it does not tell me which file has this error. So instead of saying > "(index.erb):56: syntax error, unexpected $end, expecting '')''" it > just has (erb) where it should provide a filename. > > Can someone provide some pointers to help me narrow the field a bit? >In the absence of more forthcoming error messages I''d try removing erb files from the project until the error goes. Once you know which file has the error you should be in a better position to work out what it is. You might also want to git bisect to try and find the revision that added the problem (assuming you are using git) Fred> ERROR MESSAGE: > --------------------------------------------------------------------------- --------------------------- > Fast Debugger (ruby-debug-ide 0.4.9) listens on :xxxx > => Booting WEBrick > => Rails 2.3.5 application starting onhttp://0.0.0.0:3000 > (erb):56 > Uncaught exception: compile error > (erb):56: syntax error, unexpected $end, expecting '')'' > ; _erbout > ^ > --------------------------------------------------------------------------- --------------------------- > > Thanks for any assistance you can offer!-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Feb-26 10:05 UTC
Re: Rails Project Won''t Compile - No Detailed Errors - Help!
On 26 February 2011 00:37, noname <informzoo.admin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When I try to run my rails project, I get a message that there is a > syntax error and the application cannot compile (see below). However, > it does not tell me which file has this error. So instead of saying > "(index.erb):56: syntax error, unexpected $end, expecting '')''" it > just has (erb) where it should provide a filename. > > Can someone provide some pointers to help me narrow the field a bit?Is there anything in the log file (log/development.log assuming you are in development mode)? Are you running the server from netbeans? If so have you tried running from command line just in case it is a netbeans issue? If you make a new rails app does it run? Colin> > > ERROR MESSAGE: > ------------------------------------------------------------------------------------------------------ > Fast Debugger (ruby-debug-ide 0.4.9) listens on :xxxx > => Booting WEBrick > => Rails 2.3.5 application starting on http://0.0.0.0:3000 > (erb):56 > Uncaught exception: compile error > (erb):56: syntax error, unexpected $end, expecting '')'' > ; _erbout > ^ > ------------------------------------------------------------------------------------------------------ > > > Thanks for any assistance you can offer! > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Pavling
2011-Feb-26 10:19 UTC
Re: Rails Project Won''t Compile - No Detailed Errors - Help!
On 26 February 2011 00:37, noname <informzoo.admin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ERROR MESSAGE: > Uncaught exception: compile error > (erb):56: syntax error, unexpected $end, expecting '')'' > ; _erbout > > Can someone provide some pointers to help me narrow the field a bit?This is a horrid error to debug, because of the nature of it. You''ve left off a closing bracket somewhere, so the interpreter has gotten all the way to the last "end" and said, "hang on, I have one opening bracket too many" and baulked. The easiest way to debug it is to go back to the last edits you did, and look at the code for any unexpected indentation (if your editor supports auto-indenting, or even better, identifying unclosed brackets, it will help). Otherwise, you''re approach could be to remove all your files from the app, and introduce them back one or two at a time - when it breaks, you have narrowed-down the source of the problem... of course, this approach has the difficulty of having to potentially make large edits to the code to get it running with no models... :-/ Sorry I can''t be any more help. M -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.