Ccyan
Ccyan

Reputation: 1057

Couldn't find "fullcalendar"

We're using Rails Assets in our project and we're in the process of updating Ruby from 2.3.7 to 2.4.7, following this guide. I think I've resolved all the gems issues, but when I'm trying to run rspec or navigate to any admin page, I'm greeted with this error:

couldn't find file 'fullcalendar'

This is one of the Rails Assets mentioned above, and I'm not sure why this is happening.

My gemfile:

source 'https://rails-assets.org' do
  gem 'rails-assets-jquery'
  gem 'rails-assets-jquery-ujs'
  gem 'rails-assets-jquery-ui'
  gem 'rails-assets-js-cookie'
  gem 'rails-assets-lodash'
  gem 'rails-assets-highcharts'
  # gem 'rails-assets-quill'
  gem 'rails-assets-select2'
  gem 'rails-assets-select2-bootstrap-css'
  gem 'rails-assets-slick.js'
  gem 'rails-assets-picturefill'
  gem 'rails-assets-scrollmagic'
  gem 'rails-assets-gsap'
  gem 'rails-assets-fullcalendar'
  gem 'rails-assets-moment'
  gem 'rails-assets-jstzdetect'
  gem 'rails-assets-blueimp-file-upload'
  gem 'rails-assets-air-datepicker'
end

/app/views/layouts/admin.haml:

= javascript_include_tag 'admin'

/app/assets/javascripts/admin.js

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery-ujs
//= require jquery-ui/jquery-ui
//= require lodash
//= require bootstrap
//= require moment
//= require quill
//= require fullcalendar
//= require select2
//= require jstzdetect
//= require cocoon
//= require blueimp-file-upload/jquery.iframe-transport.js
//= require blueimp-file-upload/vendor/jquery.ui.widget.js
//= require blueimp-file-upload/jquery.fileupload.js
//= require_tree ./admin

What have me scratching my head is that the assets above fullcalendar are loading fine, but this one throws an error.

This app is running on Rails 4.2.7.1 and ruby 2.3.7. I'm trying to update Ruby version to ruby 2.4.7.

Upvotes: 1

Views: 235

Answers (1)

mahemoff
mahemoff

Reputation: 46389

Try replacing require fullcalendar with

require fullcalendar/core/main.js
require fullcalendar/daygrid/main.js

Just a guess based on the doc

Alternatively, just remove it from assets and put the files directly in vendor folder; or use this gem.

Upvotes: 1

Related Questions