Jeff Coleman
2006-Mar-30 16:32 UTC
[Rails] Illegal char \002? Need to restart Rails to see changes?
Hi all, I''m developing an app on a home Windows computer and using SVN/Capistrano to deploy to a Linux server. I''m encountering some bizarre behavior that I think has something to do with Linux and Windows text file types, but I''m not sure. What''s happening is that, whenever I edit my view files and reload the page in my local browser, I see errors saying I have Syntax errors and illegal characters in my files. There''s never anything obvious (to me) wrong with the file, but if I Ctrl-C out of WEBrick and restart it, the file works fine. Until the next time I edit it. Here''s an example, from a change to a partial template. It was working properly, and the only change I made was to add "<p>Hi</p>" to the top. Then I refreshed the page in the browser and got this: SyntaxError in Houses#list Showing app/views/houses/_house.rhtml where line #3 raised: compile error ./script/../config/../app/views/houses/_house.rhtml:3: parse error, unexpected $, expecting kEND _erbout.concat " <h3 class=\"house_title\">" ^ Extracted source (around line #3): 1: <p>Hi</p> 2: <div class="house"> 3: <h3 class="house_title"><%= link_to_unless_current h(house.address), :action => ''show'', :id => house.id %></h3> 4: <%= link_to_unless_current image_tag("/images/houses/small/front", :size => ''150x100''), :action => ''show'', :id => house.id %> 5: <%= "<div id=''description_#{house.id}''>" %> 6: <ul class="address"> --- This behavior started happening when I added the "file_column" plugin to my app, but I''m not sure what it has to do with it. It''s been really frustrating getting SVN and Capistrano set up and now I''m finally ready to just start working on the actual behavior of my app, I find all these problems that are beyond the scope of my understanding. I''ve rebuilt my app half a dozen times today, starting from scratch with fresh Rails installs and incrementally copying files in and still I can''t squash these problems. Help! Jeff P.S. I kinda feel like I''ve been monopolizing this list, posting quite a few requests for help over the last few days. I apologize if that''s the case, but all the responses I''ve gotten have helped me immensely, so I keep coming back :) -- Posted via http://www.ruby-forum.com/.
Ray Baxter
2006-Mar-30 16:54 UTC
[Rails] Re: Illegal char \002? Need to restart Rails to see changes?
Jeff Coleman wrote:> I''m developing an app on a home Windows computer and using > SVN/Capistrano to deploy to a Linux server. I''m encountering some > bizarre behavior that I think has something to do with Linux and Windows > text file types, but I''m not sure. > > What''s happening is that, whenever I edit my view files and reload the > page in my local browser, I see errors saying I have Syntax errors and > illegal characters in my files. There''s never anything obvious (to me) > wrong with the file, but if I Ctrl-C out of WEBrick and restart it, the > file works fine. Until the next time I edit it. > > Here''s an example, from a change to a partial template. It was working > properly, and the only change I made was to add "<p>Hi</p>" to the top. > Then I refreshed the page in the browser and got this: > > SyntaxError in Houses#list > > Showing app/views/houses/_house.rhtml where line #3 raised: > > compile error > ./script/../config/../app/views/houses/_house.rhtml:3: parse error, > unexpected $, expecting kEND > _erbout.concat " <h3 class=\"house_title\">" > ^ > > Extracted source (around line #3): > > 1: <p>Hi</p> > 2: <div class="house"> > 3: <h3 class="house_title"><%= link_to_unless_current h(house.address), > :action => ''show'', :id => house.id %></h3> > 4: <%= link_to_unless_current image_tag("/images/houses/small/front", > :size => ''150x100''), :action => ''show'', :id => house.id %> > 5: <%= "<div id=''description_#{house.id}''>" %> > 6: <ul class="address">Many people are reporting errors of this type on Windows. The reports claim that by replacing tabs with spaces in the source file that the problems are resolved. HTH -- Ray
Jeff Coleman
2006-Mar-30 17:07 UTC
[Rails] Re: Illegal char \002? Need to restart Rails to see changes?
How odd. That seemed to do it, for that file at least. What on earth would be at the bottom of a bug like that? Ray Baxter wrote:> Jeff Coleman wrote: > >> >> unexpected $, expecting kEND >> :size => ''150x100''), :action => ''show'', :id => house.id %> >> 5: <%= "<div id=''description_#{house.id}''>" %> >> 6: <ul class="address"> > > Many people are reporting errors of this type on Windows. The reports > claim that by replacing tabs with spaces in the source file that the > problems are resolved. > > HTH > > -- > > Ray-- Posted via http://www.ruby-forum.com/.
Jeff Coleman
2006-Mar-30 17:18 UTC
[Rails] Re: Illegal char \002? Need to restart Rails to see changes?
Found some bug reports indicating that RMagick changes the method String.dump, which is also used in the ERB interpreter. I am indeed using RMagick so I have no doubt that''s the culprit. Thanks again, Ray. Jeff -- Posted via http://www.ruby-forum.com/.
Ben Reubenstein
2006-Mar-30 18:32 UTC
[Rails] Re: Illegal char \002? Need to restart Rails to see changes?
This issue is a Ruby 1.8.4 / Windows issue I believe. On 3/30/06, Jeff Coleman <progressions@gmail.com> wrote:> > Found some bug reports indicating that RMagick changes the method > String.dump, which is also used in the ERB interpreter. I am indeed > using RMagick so I have no doubt that''s the culprit. > > Thanks again, Ray. > > Jeff > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein http://www.benr75.com
Richard Livsey
2006-Mar-30 19:13 UTC
[Rails] Re: Illegal char \002? Need to restart Rails to see changes?
Ben Reubenstein wrote:> On 3/30/06, Jeff Coleman <progressions@gmail.com> wrote: >> Found some bug reports indicating that RMagick changes the method >> String.dump, which is also used in the ERB interpreter. I am indeed >> using RMagick so I have no doubt that''s the culprit. >> >> Thanks again, Ray. >> >> Jeff >>> This issue is a Ruby 1.8.4 / Windows issue I believe. > I have the same issue and downgraded back to 1.8.2 to get rid of it. Bit of a pain. Where''s my Mac ;o) -- R.Livsey http://livsey.org
Jeff Coleman
2006-Mar-30 19:31 UTC
[Rails] Re: Re: Illegal char \002? Need to restart Rails to see chan
Richard Livsey wrote:> Ben Reubenstein wrote: >> On 3/30/06, Jeff Coleman <progressions@gmail.com> wrote: >>> Found some bug reports indicating that RMagick changes the method >>> String.dump, which is also used in the ERB interpreter. I am indeed >>> using RMagick so I have no doubt that''s the culprit. >>> >>> Thanks again, Ray. >>> >>> Jeff >>> > > This issue is a Ruby 1.8.4 / Windows issue I believe. > > > > I have the same issue and downgraded back to 1.8.2 to get rid of it. > > Bit of a pain. Where''s my Mac ;o)Darn, but to run Rails 1.1 I''d need to stick with 1.8.4, right? Jeff -- Posted via http://www.ruby-forum.com/.
Richard Livsey
2006-Mar-30 19:32 UTC
[Rails] Re: Re: Illegal char \002? Need to restart Rails to see chan
Jeff Coleman wrote:> Richard Livsey wrote: >> >> I have the same issue and downgraded back to 1.8.2 to get rid of it. >> >> Bit of a pain. Where''s my Mac ;o) > > Darn, but to run Rails 1.1 I''d need to stick with 1.8.4, right? > > Jeff >I''m running edge rails quite happily on 1.8.2 -- R.Livsey http://livsey.org
Ben Reubenstein
2006-Mar-30 20:30 UTC
[Rails] Re: Re: Illegal char \002? Need to restart Rails to see chan
To quote DHH: "If you''re on Ruby 1.8.2 with Windows, though, you''ll want to upgrade to the 1.8.4 (or the script/console will fail). And even if you''re on another platform, it''s a good idea to upgrade to Ruby 1.8.4. We still support 1.8.2, but might not in the next major release. So may as well get the upgrading with over with now." On 3/30/06, Richard Livsey <richard@livsey.org> wrote:> Jeff Coleman wrote: > > Richard Livsey wrote: > >> > >> I have the same issue and downgraded back to 1.8.2 to get rid of it. > >> > >> Bit of a pain. Where''s my Mac ;o) > > > > Darn, but to run Rails 1.1 I''d need to stick with 1.8.4, right? > > > > Jeff > > > > I''m running edge rails quite happily on 1.8.2 > > -- > R.Livsey > http://livsey.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein http://www.benr75.com
Jeff Coleman
2006-Mar-30 20:35 UTC
[Rails] Re: Re: Re: Illegal char \002? Need to restart Rails to see
Ben Reubenstein wrote:> To quote DHH: > > "If you''re on Ruby 1.8.2 with Windows, though, you''ll want to upgrade > to the 1.8.4 (or the script/console will fail). And even if you''re on > another platform, it''s a good idea to upgrade to Ruby 1.8.4. We still > support 1.8.2, but might not in the next major release. So may as well > get the upgrading with over with now." > > On 3/30/06, Richard Livsey <richard@livsey.org> wrote: >> > >> > -- > Ben Reubenstein > http://www.benr75.comHopefully by the time it becomes an issue with the next Rails release, RMagick might be updated to fix the current issue. Jeff -- Posted via http://www.ruby-forum.com/.
Richard Livsey
2006-Mar-30 22:35 UTC
[Rails] Re: Re: Illegal char \002? Need to restart Rails to see chan
Ben Reubenstein wrote:> To quote DHH: > > "If you''re on Ruby 1.8.2 with Windows, though, you''ll want to upgrade > to the 1.8.4 (or the script/console will fail). And even if you''re on > another platform, it''s a good idea to upgrade to Ruby 1.8.4. We still > support 1.8.2, but might not in the next major release. So may as well > get the upgrading with over with now."I tried to upgrade. Things broke so I downgraded again. Once RMagick etc work I''ll happily upgrade. Until that point the only thing so far which doesn''t work is script/console and that''s easy to patch. -- R.Livsey http://livsey.org
John@dfdsf.be
2006-Mar-31 00:22 UTC
[Rails] Re: Re: Re: Illegal char \002? Need to restart Rails to see
I think its got nothing to do with RMagick but with copying code. Had the same problem with code copied from mail. Got an error but nothing showed up until I used ''view'' ''show invisibles'' in TextMate Funny characters showed up that I deleted and all was well. Now the code I copied was from someone on windows. I am running on a mini with Rails 1.1 and file_column and rmagick and very happy !!! Hope this helps -- Posted via http://www.ruby-forum.com/.