问题
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.
Change it to minimum version syntax
gem 'gcal4ruby', '>= 0.0.5'
Change to correct specific gem version
gem 'gcal4ruby', '0.5.5'
Hope that helps
来源:https://stackoverflow.com/questions/4182265/getting-gcal4ruby-gem-to-work