I used this command to install gems for my rails project 
and I added following in `application.js`

```
require jquery-ui
require jquery-colorpicker

```

This gave error:

> 
> could not find file 'jquery-colorpicker'
> 
> 
> 

this is the code for **items/new.js.erb**

```
$('#dialog h3').html("<i class='glyphicon glyphicon-plus'></i> Add New Item");
$('.modal-body').html('<%= j render("form") %>');
$('#dialog').modal("show");
$('#dialog').on('shown.bs.modal', function () {
#   $('.colorpicker').focus()
    $('.colorpicker').colorpicker {autoOpen:true, hideOn:'button'}
})

```