# Unexpected "unexpected kEND, expecting $"

**URL:** <https://www.ruby-forum.com/t/unexpected-unexpected-kend-expecting/91484>\
**Category:** Rails\
**Created:** [April 9, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/unexpected-unexpected-kend-expecting/91484 "2007-04-09T18:05:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thooby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@thooby](https://www.ruby-forum.com/u/thooby)\
**Post date:** [April 9, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/unexpected-unexpected-kend-expecting/91484/1 "2007-04-09T18:05:11Z")

</div>

I know about this error. It appears when you put an END in a wrong  
place or forget to close a parentesis etc … But I have only a module  
helper with two lines in a file named “noticias\_helper.rb”

Module NoticiasHelper  
end

I have checked with hexdump to see if there are an strange character  
and it is not

hexdump -c app/helpers/noticias\_helper.rb  
0000000 M o d u l e N o t i c i a s  
H  
0000010 e l p e r \n e n d \n  
hexdump app/helpers/noticias\_helper.rb  
0000000 6f4d 7564 656c 4e20 746f 6369 6169 4873  
0000010 6c65 6570 0a72 6e65 0a64

And this is my error message in development.log

SyntaxError (/web/hika/config/…/app/helpers/noticias\_helper.rb:2:  
parse error, unexpected kEND, expecting $): /vendor/rails/  
activerecord/lib/…/…/activesupport/lib/active\_support/  
dependencies.rb:140:in `load' /vendor/rails/activerecord/lib/../../activesupport/lib/ active_support/dependencies.rb:140:in`load’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/  
active\_support/dependencies.rb:56:in `require_or_load' /vendor/rails/activerecord/lib/../../activesupport/lib/ active_support/dependencies.rb:30:in`depend\_on’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/  
active\_support/dependencies.rb:85:in `require_dependency' /vendor/rails/actionpack/lib/action_controller/helpers.rb:114:in`default\_helper\_module!’  
/vendor/rails/actionpack/lib/action\_controller/helpers.rb:127:in  
`inherited_without_api' /vendor/rails/actionwebservice/lib/action_web_service/container/ action_controller_container.rb:86:in`inherited\_without\_action\_controller’  
/vendor/rails/actionwebservice/lib/action\_web\_service/dispatcher/  
action\_controller\_dispatcher.rb:34:in `inherited' /app/controllers/noticias_controller.rb:2 /vendor/rails/activerecord/lib/../../activesupport/lib/ active_support/dependencies.rb:140:in`load’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/  
active\_support/dependencies.rb:56:in `require_or_load' /vendor/rails/activerecord/lib/../../activesupport/lib/ active_support/dependencies.rb:30:in`depend\_on’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/  
active\_support/dependencies.rb:85:in `require_dependency' /vendor/rails/activerecord/lib/../../activesupport/lib/ active_support/dependencies.rb:98:in`const\_missing’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/  
active\_support/dependencies.rb:131:in `const_missing' generated/routing/recognition.rb:4:in`recognize\_path’  
/vendor/rails/actionpack/lib/action\_controller/routing.rb:477:in  
`recognize!' /vendor/rails/railties/lib/dispatcher.rb:38:in`dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ rails.rb:76:in`process’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:  
618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 617:in`process\_client’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:  
736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb: 736:in`run’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:  
720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:271:in`run’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails: 127:in`run’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
command.rb:211:in `run’  
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:  
243  
/usr/local/bin/mongrel\_rails:18

I am using ferret (0.11.4) and act\_as\_ferret 0.4.0

In which part on the program I need to look in order to catch my bug?

Best Regards

---

<div class="post-metadata">

**Author:** ![thooby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@thooby](https://www.ruby-forum.com/u/thooby)\
**Post date:** [April 9, 2007, 6:17pm UTC](https://www.ruby-forum.com/t/unexpected-unexpected-kend-expecting/91484/2 "2007-04-09T18:17:13Z")

</div>

try using “module” not “Module”

-mike

On 4/9/07, thooby [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> SyntaxError (/web/hika/config/…/app/helpers/noticias\_helper.rb:2:  
> active\_support/dependencies.rb:85:in `require_dependency' /vendor/rails/activerecord/lib/../../activesupport/lib/ active_support/dependencies.rb:131:in `const\_missing’  
> /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:  
> configurator.rb:270:in `run’  
> In which part on the program I need to look in order to catch my bug?
> 
> Best Regards
> 
> >

–  
-mike

---

<div class="post-metadata">

**Author:** ![thooby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@thooby](https://www.ruby-forum.com/u/thooby)\
**Post date:** [April 9, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/unexpected-unexpected-kend-expecting/91484/3 "2007-04-09T23:44:56Z")

</div>

Thanks Mike, It works. What a stupid error!

juan

---

<div class="post-metadata">

**Author:** ![thooby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@thooby](https://www.ruby-forum.com/u/thooby)\
**Post date:** [April 10, 2007, 2:04am UTC](https://www.ruby-forum.com/t/unexpected-unexpected-kend-expecting/91484/4 "2007-04-10T02:04:11Z")

</div>

sometimes the most obvious are the hardest errors to find.

Your welcome.

On 4/9/07, thooby [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > On 4/9/07, thooby [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > end  
> > > 0000010 6c65 6570 0a72 6e65 0a64  
> > > active\_support/dependencies.rb:56:in `require_or_load' `inherited\_without\_action\_controller’  
> > > active\_support/dependencies.rb:85:in `require_dependency' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ 720:in `run’  
> > > /usr/local/bin/mongrel\_rails:18
> 
> >

–  
-mike
