简体   繁体   中英

Calendar on RoR (FullCalendar) not working after gem updates

FullCalendar stopped working after I upgraded some gems. I needed to add 'google-api-client' to the Gemfile and the Bundle Install process gave me the following message:

itsjustme@rubberroom:~/Projects/FunnyFarm$ bundle
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Bundler could not find compatible versions for gem "faraday":
  In snapshot (Gemfile.lock):
    faraday (0.8.0)

  In Gemfile:
    google-api-client (>= 0.5.0) ruby depends on
      faraday (~> 0.8.1) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Following instructions, I issued a Bundle Update. This was the result:

itsjustme@rubberroom:~/Projects/FunnyFarm$ bundle update
Fetching gem metadata from https://rubygems.org/.....
Error Bundler::HTTPError during request to dependency API
Fetching full source index from https://rubygems.org/
Using rake (10.0.2) 
Using i18n (0.6.1) 
Using multi_json (1.3.7) 
Using activesupport (3.2.3) 
Using builder (3.0.4) 
Using activemodel (3.2.3) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Using actionpack (3.2.3) 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.4.4) 
Using actionmailer (3.2.3) 
Using arel (3.0.2) 
Using tzinfo (0.3.35) 
Using activerecord (3.2.3) 
Using activeresource (3.2.3) 
Installing addressable (2.3.2) 
Installing extlib (0.9.15) 
Installing autoparse (0.3.2) 
Using bcrypt-ruby (3.0.1) 
Using bundler (1.2.2) 
Using coffee-script-source (1.4.0) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Using json (1.7.5) 
Using rdoc (3.12) 
Using thor (0.14.6) 
Using railties (3.2.3) 
Using coffee-rails (3.2.2) 
Using multipart-post (1.1.5) 
Using faraday (0.8.4) 
Using jwt (0.1.5) 
Installing launchy (2.1.2) 
Installing signet (0.4.3) 
Installing uuidtools (2.1.3) 
Installing google-api-client (0.5.0) 
Using haml (3.1.7) 
Using httpauth (0.2.0) 
Using jquery-rails (2.1.3) 
Using libv8 (3.3.10.4) 
Using mobilepronto (0.3.2) 
Using mysql2 (0.3.11) 
Using oauth (0.4.7) 
Using oauth2 (0.6.1) 
Using rails (3.2.3) 
Using sass (3.2.3) 
Using sass-rails (3.2.5) 
Using sorcery (0.7.13) 
Using sqlite3 (1.3.6) 
Using therubyracer (0.10.2) 
Using uglifier (1.3.0) 
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem
is installed.

Neither CSS nor jQuery files were modified and, being new to RoR, I have no idea where to start looking for a solution.

Screenshots

This is a screenshot taken before the update: http://pic.twitter.com/85gUGSg3

This one, after the update: http://pic.twitter.com/rYvIhsbe

Files

The view is too simple to make a difference. But here it is, anyway (show.html.haml):

%h4 Agenda dos Médicos
#calendar

Similarly, the controller is almost empty. It just points to the view.

class WorkSchedsController < ApplicationController
  before_filter :require_login
  def show
  end
end

The magic of it all happens thanks to fullcalendar.js, configured as follows:

$(document).ready(function() {
  $('#calendar').fullCalendar({
    header: {
      left: 'prev,next today',
      center: 'title',
      right: 'month,agendaWeek,agendaDay'
    },
    eventSources: [
      // Dr. John Doe
      {
      url: 'https://www.google.com/calendar/feeds/userthis%40gmail.com/private-blah/basic',
      color: 'dodgerblue'
      },
      // Dr. Jane Doe
      {
      url: 'https://www.google.com/calendar/feeds/userthat%40gmail.com/private-blah/basic',
      color: 'brown'
      },
      // Code abbreviated
      {
      ...
      }
    ]
  });
});

For the sake of completeness, this is the Gemfile, before the adding 'fullcalendar-rails' (as suggested by Mr. Durrant):

source 'https://rubygems.org'

gem 'rails', '3.2.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem 'sorcery'
gem 'mobilepronto'
gem 'execjs'
gem 'therubyracer'
gem 'mysql2'
gem 'haml'
gem 'sass'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

Seems the table which sets the calendar has been flattened. Can anyone help? Give some pointers or something?

What I see on your screenshots , it reminds me of the nightmare I had in the hot summer days . I have added a class in the .css.scss file , but forgot to close it (one little '}'). No matter I've tried it was a pain and sorrow in various tempos .

In your case I would focus in searching for inconsistent stylesheet , related with the tag "tbody" . It seems all the other css and js are OK . Keep us updated , sir .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM