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:
./script/…/config/…/app/views/houses/_house.rhtml:3: parse error,
unexpected $, expecting kEND
_erbout.concat " <h3 class=“house_title”>"
Extracted source (around line #3):
<%= link_to_unless_current h(house.address),
:action => ‘show’, :id => house.id %>
4: <%= link_to_unless_current image_tag("/images/houses/small/front",
:size => ‘150x100’), :action => ‘show’, :id => house.id %>
5: <%= “
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.
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