I’m confused…
I have installed a new gem file which packages a bunch of js (rails-fullcalendar).
I now want to use this gem. So I added some
<div id='calendar'></div>
which I use with some js in my application
$('#calendar').fullCalendar();
Problem is, it won’t work since I don’t have the proper js files. I added js includes in my layout like this:
<%= javascript_include_tag "fullcalendar.js" %>
But that makes little sense. There is no fullcalendar.js in my assets so the browser complains about missing js files. Where are theses js in the gem file? How do I include js from this gem file?
For a beginner, this was not obvious. Not even sure this is the best answer.
First, in your application.js add js from the gem:
Then, in aplication.css add the css from the gems like this:
This file generates a CSS automatically when you start the server. So don’t forget to RESTART THE SERVER (I didn’t know I had to, so I cursed my computer many many times).
Life is wonderful once more!