0

I'm using the carrierwave gem in my app and in my Gemfile I have the line:

gem "carrierwave", "0.9.0"

Recently, a fix for i18n override problem with Rails 4 was committed, so what I want is to get just this specific commit and apply it to my local gem.

What steps should I follow to do this?

random
  • 9,774
  • 10
  • 66
  • 83
medBouzid
  • 7,484
  • 10
  • 56
  • 86
  • Try: http://stackoverflow.com/questions/2577346/how-to-install-gem-from-github-source – Phlip Nov 12 '13 at 20:06
  • possible duplicate of [How to merge a specific commit in git](http://stackoverflow.com/questions/881092/how-to-merge-a-specific-commit-in-git) well at least I think the same principles are involved. – zwippie Nov 12 '13 at 20:07
  • @Phlip this will fetch other commit in the master repository – medBouzid Nov 12 '13 at 20:12
  • @zwippie thank you for the link i already read this answer, but i'm new to github and i want a simple steps i know how to google when i have a problem, so this is the reason why i say i need steps one by one ... – medBouzid Nov 12 '13 at 20:14
  • @zwippie the post in your link you can see that in the answer, the guy have already knowledge he say : I have forked a branch from a repository it github and commit something for my using...., but in my case i don't know how to fork then commit this change ... – medBouzid Nov 12 '13 at 20:17
  • @medBo you must look up how to pass the hashtag of the specific version you want into gem. Try (literally) reading it's source, and look for where it reads the `:git =>` part. – Phlip Nov 12 '13 at 20:33
  • @Phlip I'm new to git and github, i don't know how to do what you say, and this is why i ask the question here :) – medBouzid Nov 12 '13 at 20:40

1 Answers1

0

You can't just pick up a commit and apply it to your gem. However you can use the entire version on github instead of the version on rubygems.

gem 'carrierwave', git: 'git://github.com/carrierwaveuploader/carrierwave.git', ref: '210d25c629ad24450b5d1f480a92e7500d8ed5b9'

The ref parameter is on the commit that fix i18n.

basgys
  • 4,320
  • 28
  • 39
  • i think you are wrong about this :) read this proposition here : https://github.com/carrierwaveuploader/carrierwave/pull/1229 before the last comment – medBouzid Nov 12 '13 at 20:47
  • look at this too : http://markosullivan.ca/how-to-handle-a-pull-request-from-github/ and http://gitready.com/intermediate/2009/03/04/pick-out-individual-commits.html – medBouzid Nov 12 '13 at 20:48
  • Of course you can fork the projet and cherry pick the commit. So if you already know that what was your question? :) – basgys Nov 12 '13 at 21:55
  • problem is i don't know how to do that :D imagine you are new to git and github and someone tell you, hi you should fork the projet and cherry pick the commit !!! this don't make sense to me :) – medBouzid Nov 12 '13 at 22:22