title: It does not work select2 ruby on rails 5
body: <p><a href="https://i.stack.imgur.com/aFvc6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFvc6.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>It does not work select2 does not bring me any value, like bring value, I'm new to programming and I want to learn a lot, thanks for the help</p>
  </blockquote>
  
  <p><strong>application.css.scss</strong>
  <i></p>
  
  <pre><code>    *= require toastr
      *= require jquery-ui
      *= require select2
      *= require select2-bootstrap
      *= require_tree .
      *= require_self
      */
  
  
  
      @import 'bootstrap-sprockets';
      @import 'bootstrap';
      @import 'bootstrap-datetimepicker';
      @import "select2";
      @import "select2-bootstrap";
      @import "font-awesome-sprockets";
      @import "font-awesome";
  </code></pre>
  
  <p></i></p>
  
  <p><strong>application.js</strong></p>
  
  <p><i></p>
  
  <pre><code>    //= require jquery
      //= require turbolinks
      //= require jquery_ujs
      //= require jquery-ui/widgets/autocomplete
      //= require autocomplete-rails
      //= require select2-full
      //= require bootstrap-sprockets
      //= require moment
      //= require moment/es
      //= require bootstrap-datetimepicker
      //= require toastr
      //= require pickers
      //= require_tree .
  
  
  
  
      $( "#dropdown" ).select2({
          theme: "bootstrap"
       });
  </code></pre>
  
  <p></i></p>
  
  <p><strong>meetings.js</strong></p>
  
  <p><i></p>
  
  <pre><code>  $(document).ready(function() {
      $('#ajax-example').select2({
        ajax: {
          url: "/meetings.json",
          dataType: "json",
          results: function(data, page) {
            return { 
              results: $.map( data, function(meeting, i) { 
                return { id: meeting.id, text: meeting.name } 
              } )
            }
          }
        }
      });
    });
  </code></pre>
  
  <p></i></p>
  
  <p><strong>index.html.erb</strong></p>
  
  <p>** (index current)**</p>
  
  <p><i></p>
  
  <pre><code>   &lt;input type="text"  id="ajax-example" /&gt;
  </code></pre>
  
  <p></i></p>
  
  <p><strong>meetings_controller.rb</strong></p>
  
  <p><i></p>
  
  <pre><code> def index
     @meetings  = Meeting.order('name').all  
   end
  </code></pre>
  
  <p></i></p>
  
  <p><strong>Gemfile</strong></p>
  
  <p><i></p>
  
  <pre><code> gem 'bootswatch-rails'
   gem 'simple_form'
   gem 'bootstrap-sass', '~&gt; 3.3', '&gt;= 3.3.7'
   gem 'jquery-rails'
   gem 'will_paginate', github: 'jonatack/will_paginate'
   gem 'ransack'
   gem 'will_paginate-bootstrap'
   gem "select2-rails"
  </code></pre>
  
  <p></i></p>