1

There is a separate branch for the Twitter Bootstrap 3 gem. I understand from this SO question How to install gem from GitHub source? that when installing a gem from github, the url should end in .git However, when I go to the github page for Twitter Bootstrap 3 gem, the cloning url is exactly the same for Twitter Bootstrap 3 as it is for the master branch (version 2)

 https://github.com/seyhunak/twitter-bootstrap-rails.git

How to install Twitter bootstrap 3 gem from github?

Community
  • 1
  • 1
Leahcim
  • 40,649
  • 59
  • 195
  • 334

1 Answers1

1

You can specify a branch of a git repo in your Gemfile using the following syntax:

gem 'twitter-bootstrap-rails', github: 'seyhunak/twitter-bootstrap-rails', branch: 'bootstrap3'
Mikey
  • 2,942
  • 33
  • 37
  • The answer was actually in the question you posted: http://stackoverflow.com/questions/2577346/how-to-install-gem-from-github-source/7421712#comment15319352_7421712 – Mikey May 06 '14 at 21:17
  • You can simplify this by using `github` instead of `git`. For example: `gem 'bootstrap', github: 'seyhunak/twitter-bootstrap-rails', branch: 'bootstrap3'` – Mohamad May 06 '14 at 21:19
  • This declaration gives me a "Could not find gem 'bootstrap (>= 0) ruby' in git (...)" and i had to specify the 'complete' name of the gem: gem 'twitter-bootstrap-rails', github: 'seyhunak/twitter-bootstrap-rails', branch: 'bootstrap3' – AgostinoX Jun 16 '14 at 22:16