title: Uncaught type error: $(...).datepicker() is not a function
body: <p>I am trying to use the jQuery datepicker function but I am receiving an error <code>Uncaught type error: $(...).datepicker() is not a function</code>. I have gone through my files and do not see a double reference to jQuery or incorrect file order in the <code>application.js</code>. Could someone help point out what might be the problem?</p>
  
  <p><strong>application.html.erb</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;%= javascript_include_tag 'application' %&gt;
    &lt;title&gt;MyApp&lt;/title&gt;
  
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
  &lt;!-- CSS/Bootstrap --&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"&gt;
  
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"&gt;
  
  
    &lt;%= stylesheet_link_tag 'application' %&gt;
    &lt;%= csrf_meta_tags %&gt;
    &lt;!--  --&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
    &lt;%= render partial: "shared/top_info" %&gt;
  
  &lt;%= yield %&gt;
  
  
  
  
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"&gt;
  &lt;/script&gt;
  &lt;!--  --&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>application.js</strong></p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require ahoy
  //= require_tree .
  
  $('#customer_drop_off_date').datepicker();
  </code></pre>
  
  <p><strong>html.erb</strong></p>
  
  <pre><code>&lt;% form_tag('/post') do %&gt;
    &lt;%= text_field_tag(:customer_drop_off_date) %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>Gemfile</strong></p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '4.2.6'
  gem 'pg', '~&gt; 0.15'
  gem 'uglifier', '&gt;= 1.3.0'
  gem 'jquery-rails'
  gem 'jbuilder', '~&gt; 2.0'
  gem 'sprockets'
  gem 'sdoc', '~&gt; 0.4.0', group: :doc
  gem 'bcrypt', '~&gt; 3.1.7'
  gem 'devise'
  gem 'figaro'
  gem 'paperclip', '~&gt; 5.0.0.beta1'
  gem 'ahoy_matey'
  gem 'geocoder'
  
  group :development, :test do
    gem "pry"
    gem "pry-rails"
    gem "pry-stack_explorer"
    gem "pry-byebug"
    gem 'byebug'
  end
  
  group :development do
    gem 'web-console', '~&gt; 2.0'
    gem 'spring'
  end
  </code></pre>