uday
uday

Reputation: 8710

alternative for github : <repo-name> in gem file

I am trying to build the docrails in my system. When I clone the repo and do bundle install as the guides say.

I get the following error

You passed :github as an option for gem 'rails/active_record_deprecated_finders' , but it is invalid.

Entry in gemfile looks like this: gem 'rails/active_record_deprecated_finders', github: 'rails/active_record_deprecated_finders'

To avoid that what I am doing is commenting the rest of the line like this: gem 'rails/active_record_deprecated_finders'#, github: 'rails/active_record_deprecated_finders'

Then it foregoes that and the next problem arrives with the error message saying: Could not find gem 'active_record_deprecated_finders (>= 0) x86-mingw32' in any of the gem sources listed in your Gemfile.

Environment specs:

Bundler version 1.0.21

Rails 3.2.3

Win7 64bit

Question

  1. I dont know why its looking for x86 when my System is 64bit.Is there any work around for this? or its a bug?

  2. If gem file couldn't accept github: as parameter why is it there in the first place?

Please let me know if there are any workarounds to this problem

Upvotes: 1

Views: 1327

Answers (1)

Frederick Cheung
Frederick Cheung

Reputation: 84114

The :github option is just shorthand for a longer :git option:

gem :foo, :github => 'rails/foo'

Is just short for

gem :foo, :git => 'git://github.com/rails/foo.git'

This is new in bundler 1.1 which is why it doesn't work on your setup. You could rewrite the gemfile but it would probably be easier to update bundler. In addition bundler 1.1 is a lot faster than 1.0

Upvotes: 9

Related Questions