I was trying to fix a strange problem in Rails so I resorted to uninstalling all the gems (using a command found here: http://geekystuff.net/2009/01/14/remove-all-ruby-gems/) and then running bundle install
.
The removal was successful, but when I ran bundle install
, I got the following error:
Installing activeresource (3.2.13)
Using bundler (1.3.5) Installing rack-ssl (1.3.3)
Installing json (1.8.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension .
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb creating Makefile
make
generating generator-i386-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
make install
/usr/bin/install -c -m 0755 generator.so c:/RailsInstaller/Ruby1.9.3/lib/ruby/ge ms/1.9.1/gems/json-1.8.0/lib/json/ext /usr/bin/install: cannot remove `c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1 /gems/json-1.8.0/lib/json/ext/generator.so': Permission denied make: *** [c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.0/lib/j son/ext/generator.so] Error 1
Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/json-1.8.0 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8. 0/ext/json/ext/generator/gem_make.out An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that
gem install json -v '1.8.0'
succeeds before bundling.
I've spent a fair amount of time but still can't figure out what's wrong. Please advise.