I'm trying to get the gem to work in rails 4. I have a new rails 4 app and have added the gem and ran bundle. I also created a calendar controller and view with the following...
#app/views/calendar/index.html.erb
<div id='calendar'></div>
#app/assets/stylesheets/application.css
*= require_self
*= require fullcalendar
*= require_tree .
*/
#app/assets/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require fullcalendar
//= require_tree .
When I load the page, I get nothing, and no relevant errors in the firefox error console.
I'm trying to get the https://github./bokmann/fullcalendar-rails gem to work in rails 4. I have a new rails 4 app and have added the gem and ran bundle. I also created a calendar controller and view with the following...
#app/views/calendar/index.html.erb
<div id='calendar'></div>
#app/assets/stylesheets/application.css
*= require_self
*= require fullcalendar
*= require_tree .
*/
#app/assets/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require fullcalendar
//= require_tree .
When I load the page, I get nothing, and no relevant errors in the firefox error console.
Share Improve this question asked Oct 1, 2013 at 16:31 Mark LocklearMark Locklear 5,3751 gold badge57 silver badges89 bronze badges3 Answers
Reset to default 4You need to actually call the javascript function to set up the calendar; the gem only sets up the JS files in the asset pipeline.
See http://arshaw./fullcalendar/docs/usage/ for an example:
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
})
});
I'm leaving this here in case someone else needs it.
I had the same problem and pasting the above code did not help. I finally fixed it changing the gem version from 2.1.1.0 to 2.0.2.0
Had the same problem as @Carlos with full calender rails gem on version 2.3.1.0 and had to move to 2.0.2.0