宝石更新后RoR(FullCalendar)上的日历无法正常工作

时间:2012-11-20 05:45:15

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.2 fullcalendar

升级了一些宝石后,FullCalendar停止了工作。我需要将'google-api-client'添加到Gemfile,Bundle Install过程给了我以下消息:

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.

按照说明,我发布了捆绑更新。这就是结果:

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.

CSS和jQuery文件都没有被修改,作为RoR的新手,我不知道从哪里开始寻找解决方案。

截图

这是更新前的截图: http://pic.twitter.com/85gUGSg3

这一次,在更新后: http://pic.twitter.com/rYvIhsbe

文件

视图太简单了,无法发挥作用。但无论如何它(show.html.haml):

%h4 Agenda dos Médicos
#calendar

同样,控制器几乎是空的。它只是指向了这个观点。

class WorkSchedsController < ApplicationController
  before_filter :require_login
  def show
  end
end

由于fullcalendar.js配置如下,所有这一切都发生了魔力:

$(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
      {
      ...
      }
    ]
  });
});

为了完整起见,这是Gemfile,在添加'fullcalendar-rails'之前(正如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'

似乎表格中的日历已被展平。 有人可以帮忙吗?给点指示什么?

1 个答案:

答案 0 :(得分:0)

我在你的截图上看到的,它让我想起了炎热夏日里的噩梦。我在.css.scss文件中添加了一个类,但忘了关闭它(一点'}')。无论我尝试过,这都是各种节奏的痛苦和悲伤。

在你的情况下,我将专注于搜索与标签“tbody”相关的不一致样式表。似乎所有其他的css和js都可以。保持更新,先生。

相关问题