0

I have an event handler on keyup defined in coffeescript:

$('#query_raw_query').keyup ->
    clearsearch()

This works fine in development (clearsearch is defined earlier in the coffee file). However when I deploy, it doesn't work and I don't see any errors anywhere. I've tried manually compiling assets, I've tried setting

config.serve_static_assets = true

in production.rb, I've tried moving coffee-rails out of the :assets scope in my Gemfile.

gem 'coffee-rails', '~> 3.2.1'
group :assets do
  gem 'sass-rails'

I'm out of ideas, anyone have any idea why this wouldn't work, or at least where I could look for errors?

Thanks for any help.

user1130176
  • 1,772
  • 1
  • 23
  • 33

1 Answers1

0

I think your problem might be similar to this one:

Coffeescript/Javascript Is Not Working on Server

Have a try there and see if it works for you.

Community
  • 1
  • 1
Yang
  • 1,915
  • 1
  • 9
  • 15