Guest User

Untitled

a guest
May 19th, 2013
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. Job Load (0.4ms) SELECT jobs.id, jobs.title FROM `jobs` WHERE (LOWER(jobs.title) ILIKE 'te%') ORDER BY jobs.title ASC LIMIT 10
  2. Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ILIKE 'te%') ORDER BY jobs.title ASC LIMIT 10' at line 1: SELECT jobs.id, jobs.title FROM `jobs` WHERE (LOWER(jobs.title) ILIKE 'te%') ORDER BY jobs.title ASC LIMIT 10
  3. Completed 500 Internal Server Error in 131ms
  4.  
  5. ActiveRecord::StatementInvalid (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ILIKE 'te%') ORDER BY jobs.title ASC LIMIT 10' at line 1: SELECT jobs.id, jobs.title FROM `jobs` WHERE (LOWER(jobs.title) ILIKE 'te%') ORDER BY jobs.title ASC LIMIT 10):
  6.  
  7.  
  8. # gemfile
  9. gem 'jquery-rails'
  10. gem 'rails3-jquery-autocomplete'
  11.  
  12. # jobs_controller.rb
  13. autocomplete :tag, :name
  14. autocomplete :job, :title
  15.  
  16. # routes.rb
  17. resources :jobs do
  18. get :autocomplete_tag_name, :on => :collection
  19. get :autocomplete_job_title, :on => :collection
  20. end
  21.  
  22. #chrome console
  23. GET http://localhost:3000/jobs/autocomplete_job_title?term=te 500 (Internal Server Error)
  24. f.support.ajax.f.ajaxTransport.sendjquery.min.js:4
  25. f.extend.ajaxjquery.min.js:4
  26. f.each.f.(anonymous function)jquery.min.js:4
  27. f.extend.getJSONjquery.min.js:4
  28. a.railsAutocomplete.fn.extend.init.a.autocomplete.sourceautocomplete-rails.js:16
  29. d.widget._searchjquery-ui.min.js:326
  30. d.widget.searchjquery-ui.min.js:326
  31. (anonymous function)
  32.  
  33. group :production do
  34. gem 'pg'
  35. end
  36.  
  37. group :production do
  38. gem 'pg'
  39. end
Advertisement
Add Comment
Please, Sign In to add comment