Getting gcal4ruby gem to work

99封情书 提交于 2019-12-13 03:47:02

问题


I'm trying to create a RoR web application that allows people to connect to their accounts to google calendar.

I found a gem called gcal4ruby that seemed to do the right things based on looking at sample code and its documentation.

I ran gem install and the cmd claimed the installation was ok.

However, when I added the gem to my gemfile then try to run the server again I get: Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.

Then I tried bundle install which basically gets me the message above and a line: Fetching source index for http://rubygems.org/ Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources

Yet when I type in "gem list -d g", gcal4ruby (0.5.5) appears on the list. I've tried adding in requires and includes but that just gets me uninitialized constant errors.

Other details that may be relevant: ruby 1.8.7 rails 3.0.1

gem check --alien returns: mysql-2.8.1-x86-mingw32 has 1 problems .require_paths: Extra file *Note: This doesn't seem to negatively impact me when I'm doing anything though.

If possible, please supply tutorials/sites with samples of working code.

Cheers, Zigu


回答1:


Could you post your gemfile please?

I'm guessing your Gemfile reads

gem 'gcal4ruby', '0.0.5'

which means it will only look for that specific verison. So there are two ways to fix this.

  1. Change it to minimum version syntax

    gem 'gcal4ruby', '>= 0.0.5'

  2. Change to correct specific gem version

    gem 'gcal4ruby', '0.5.5'

Hope that helps



来源:https://stackoverflow.com/questions/4182265/getting-gcal4ruby-gem-to-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!