Zigu
Zigu

Reputation: 1665

Installing gems tutorial

Is there anywhere that there are step by step instructions on how to install gems?

My google-fu is weak and those that I could find did not resolve my error.

My errors are detailed here: Getting gcal4ruby gem to work

Basically my error sums up as: gem installs properly and is detectable by, but whenever I try to reference it in my application it just says: Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.

(* I tried bundle install -> no help *)

Upvotes: 0

Views: 263

Answers (2)

Matt Briggs
Matt Briggs

Reputation: 42158

As a guess, you are using rails 3? Rails 3 uses a project called bundler for dependencies, so instead of installing the gem in your system ruby, add gem 'gcal4ruby to the Gemfile in the root of your app. after that, a bundle install will install the gem locally into your app.

Bundler means that rails 3 apps have their gems completely isolated from the system gems. Even if the gem is installed in the system, it will not be accessible in the app.

Upvotes: 0

Ryan Bigg
Ryan Bigg

Reputation: 107718

Your error states:

 Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.

It's looking for 0.0.5 of gcal4ruby, which you don't have installed, rather you're saying yourself that the gem list -d shows:

 gcal4ruby (0.5.5) 

Which is not the correct version. I would recommend attempting to discover what's trying to require this older version of gcal4ruby. I think it's in your Gemfile, but I have been known to be wrong occasionally.

If this answer doesn't solve your question, then please attach the errors you're getting and your Gemfile to your question.

Upvotes: 1

Related Questions