0

I have a gem file in which i am trying to get "gem 'twitter-bootstrap-rails', git: 'https://github.com/seyhunak/twitter-bootstrap-rails.git'"

Using bundle install command and it gives the below error:

C:\Sooraj\Playdrone\playdrone-master>bundle install

Fetching https://github.com/seyhunak/twitter-bootstrap-rails.git
fatal: '/cygdrive/c/Sooraj/Playdrone/playdrone-master/C:/Ruby22/lib/ruby/gems/2.
2.0/cache/bundler/git/twitter-bootstrap-rails-eff46a5fc3c9c652c290119047c5ec9247068903' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Retrying git clone --no-checkout --quiet "C:/Ruby22/lib/ruby/gems/2.2.0/cache/bundler/git/twitter-bootstrap-rails-eff46a5fc3c9c652c290119047c5ec9247068903" "C:/
Ruby22/lib/ruby/gems/2.2.0/bundler/gems/twitter-bootstrap-rails-38476dbd7f9a" 
due to error (2/4): 
Bundler::Source::Git::GitCommandError Git error: 
command `git clone --no-checkout --quiet "C:/Ruby22/lib/ruby/gems/2.2.0/cache/bundler/git/twitter-bootstrap-rails-eff46a5fc3c9c652c290119047c5ec9247068903" "C:/Ruby22/lib/ruby/gems/2.2.0/bundler/gems/twitter-bootstrap-rails-38476dbd7f9a"` 
in directory C:/Sooraj/Playdrone/playdrone-master has failed.
If this error persists you could try removing the cache directory 
'C:/Ruby22/lib/ruby/gems/2.2.0/cache/bundler/git/twitter-bootstrap-rails-eff46a5fc3c9c652c290119047c5ec9247068903'
fatal: '/cygdrive/c/Sooraj/Playdrone/playdrone-master/C:/Ruby22/lib/ruby/gems/2.2.0/cache/bundler/git/twitter-bootstrap-rails-eff46a5fc3c9c652c290119047c5ec9247068903' 
does not appear to be a git repository
fatal: Could not read from remote repository.

But the git url is correct.
Its asking me to delete the cache folder and I delete it and run the command and I get the same error.

Can anyone please help what this error is and how I can rectify?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Srini Vedula
  • 129
  • 2
  • 9

2 Answers2

2

This is similar to bundler/issues/2571, where Cygwin was installed first (before running bundle install from a CMD.exe session, outside Cygwin)

Figured it out.
The bundler installation that came with RailsInstaller has its own git installation, but when I was calling it from cygwin it was using cygwin's git and didn't know how to handle windows-style path names.
When I tested it under CMD, I had run it from cygwin so that PATH was set wrong. I renamed cygwin's git to "git_old".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

According to the documentation, it should be:

gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'

You should replace 'https' with 'git'.

Why are you pulling the latest build? This is generally not a good idea unless you have a reason to do so as it is not likely to be as stable as a release. Generally, you will want the latest stable release.

steve klein
  • 2,566
  • 1
  • 14
  • 27
  • yes sir i tried that as well and it says the same error for ...and the thing is i downloaded a project from git hub...they have this gemfile along with gemfile.lock so should i delete their gemfile.lock and then run bundle install ?? because that lock file is theirs.. – Srini Vedula Jul 05 '15 at 03:14
  • Yes you should definitely run bundle install yourself. Gemfile.lock is specific to your project (your combination of gems/versions). I guess I must have gotten something wrong in my answer hence the unexplained downvote, but I would still strongly recommend that you just use the latest release of the gem if possible by putting `gem twitter-bootstrap-rails` in your gemfile and running bundle install. – steve klein Jul 06 '15 at 02:33
  • yeah sir thats rectified i am stuck with the below issue for 4 hours http://stackoverflow.com/questions/31236420/rugged-gem-installation-issue-possibly-with-lingit2-on-windows....i installed cmake and now stuck with "checking for cmake... yes checking for gmake... no checking for make... yes checking for pkg-config... no ERROR: pkg-config is required to build Rugged. *** extconf.rb failed ***" – Srini Vedula Jul 06 '15 at 02:37
  • can i install rugged gem in windows easily? i seems to have lot of inherent dependencies – Srini Vedula Jul 06 '15 at 02:38
  • Sorry @Srini I am not that familiar with development in a Windows environment. Did you try just installing the latest release of the gem? If so, maybe update your OP with your current gem file and error you are seeing. – steve klein Jul 06 '15 at 14:22