Q:

Twitter bootstrap datepicker is not working in rails

I download the bootstrap-datepicker.js and include it in my application .js file.
It is not working in view 
 <div class="well">
<div id="dp5" class="input-append date" data-date-format="dd-mm-yyyy" data-date="12-02-2012">
<input class="span2" type="dp5" readonly="" value="12-02-2012" size="16">
<span class="add-on">
<i class="icon-th"></i>
</span>
</div>

It is not displaying the calender for date. where m i wrong?
my application.js file is
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-datepicker

//= require picker
//= require_tree .

$('#dp5').datepicker()

A:

Add //= require_self to application.js 
this includes its own file contents too.
This has to be done explicitly.
also keep the application.js  formatted 
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-datepicker
//= require picker
//= require_tree .
//= require_self

$(function() {
   $('#dp5').datepicker()
 });

// Do not keep bank spaces between included files.

I would suggest to create a new js file and add contents in it and then include it in application.js
keep application.js as a index file

