# Parse Errors - Is it the old Windows/UNIX spacing problem?

**URL:** <https://www.ruby-forum.com/t/parse-errors-is-it-the-old-windows-unix-spacing-problem/79687>\
**Category:** Rails\
**Created:** [December 18, 2006, 7:02am UTC](https://www.ruby-forum.com/t/parse-errors-is-it-the-old-windows-unix-spacing-problem/79687 "2006-12-18T07:02:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patwa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@patwa](https://www.ruby-forum.com/u/patwa)\
**Post date:** [December 18, 2006, 7:02am UTC](https://www.ruby-forum.com/t/parse-errors-is-it-the-old-windows-unix-spacing-problem/79687/1 "2006-12-18T07:02:04Z")

</div>

I’m getting this error:

SyntaxError  
app/controllers/bookings\_controller.rb:8: parse error, unexpected  
tIDENTIFIER, expecting ‘)’  
render\_text(‘Welcome to StarFlight’s Bookings!’)  
^  
app/controllers/bookings\_controller.rb:8: unterminated string meets end  
of file  
app/controllers/bookings\_controller.rb:8: parse error, unexpected $,  
expecting kEND  
RAILS\_ROOT: ./script/…/config/…

This error occured while loading the following files:  
./script/…/config/…/app/controllers/bookings\_controller.rb  
Request  
Parameters: None

The fcontroller file:  
class BookingsController \< ApplicationController

scaffold :booking  
end

def index  
render\_text(‘Welcome to StarFlight’s Bookings!’)  
end  
end

Is this just an issue with Windows putting extra symbols in? I’m using  
notepad to write the files.Oddly the other two controllers that I have,  
that don’t have a text rendering method, work fine.

I’m using [http://localhost:3000/bookings](http://localhost:3000/bookings) to load the controller.  
[http://localhost:3000/bookings#index](http://localhost:3000/bookings#index) does the same

Hussein.

---

<div class="post-metadata">

**Author:** ![patwa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@patwa](https://www.ruby-forum.com/u/patwa)\
**Post date:** [December 18, 2006, 12:22pm UTC](https://www.ruby-forum.com/t/parse-errors-is-it-the-old-windows-unix-spacing-problem/79687/2 "2006-12-18T12:22:55Z")

</div>

Hussein P. wrote:

> Is this just an issue with Windows putting extra symbols in? I’m using  
> notepad to write the files.Oddly the other two controllers that I have,  
> that don’t have a text rendering method, work fine.

Try replacing any tabs with spaces. That will likely solve your  
problems.

It really is an iffy issue on Windows. It seems to have to do with  
libraries that have been compiled with different (versions of) C  
compilers. Avoid tabs and adopt the double space best practice, and you  
should be fine though.

- Roderick

---

<div class="post-metadata">

**Author:** ![patwa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@patwa](https://www.ruby-forum.com/u/patwa)\
**Post date:** [December 18, 2006, 2:29pm UTC](https://www.ruby-forum.com/t/parse-errors-is-it-the-old-windows-unix-spacing-problem/79687/3 "2006-12-18T14:29:08Z")

</div>

Hi Hussein,

Am Montag, den 18.12.2006, 07:02 +0100 schrieb Hussein P.:

> render\_text(‘Welcome to StarFlight’s Bookings!’)

You should escape the single ticks:

render\_text(‘Welcome to StarFlight's Bookings!’)

- Marek

–  
marek kralewski  
tuxwerk ohg  
baslerstr 13  
d-79100 freiburg  
fon +49 (0)761 7043067  
fax +49 (0)761 7043066  
mobil +49 (0)171 4644052

> **[Die Internet Experten — tuxwerk](https://www.tuxwerk.de/)**
>
> tuxwerk wurde 2003 in Freiburg gegründet und arbeitet vorwiegend auf der Basis von Freier Software. Wir sind spezialisiert auf datenbankgestützte Lösungen für das Internet-Zeitalter.

---

<div class="post-metadata">

**Author:** ![patwa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@patwa](https://www.ruby-forum.com/u/patwa)\
**Post date:** [December 18, 2006, 9:23pm UTC](https://www.ruby-forum.com/t/parse-errors-is-it-the-old-windows-unix-spacing-problem/79687/4 "2006-12-18T21:23:49Z")

</div>

Hi.

I loaded up Crimson Editor, set to replace tabs with spaces and save  
files in UNIX format, then re-wrote the whole Controller file. I’m  
still getting the error:

```auto
app/controllers/bookings_controller.rb:9: parse error, unexpected kEND, 
expecting $
RAILS_ROOT: ./script/../config/..
```

My Controller File:

```auto
class BookingsController < ApplicationController
  scaffold :booking
end

def index
  render_text('Welcome to StarFlight\'s Booking System')
end

end
```

A few of my lecturers at the Uuniversity use Crimson Editor, they don’t  
seem to ever have problems with it.

Just in case it helps, my bookings view file:

```auto
<html>
<head>
  <title>bookings: <%= controller.action_name %></title>
  <%= stylesheet_link_tag 'scaffold' %>
</head>
<body>

<p style="color: green"><%= flash[:notice] %></p>

<%= index %>

<%= yield %>

</body>
</html>
```

Thanks for your help and sorry for this constant pestering. I don’t  
have the luxury of just going through a book building simple Hello  
World! apps and working up from that, unortunately, so I’m learning as I  
go.

Hussein.
