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 “
Hi
” 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:
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
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.
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.
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.
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?
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.
“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.”
“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.”
“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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.