I have recently tried to download the 'Nokogiri' gem in rails (on Windows 10 OS) with the following command.
gem install nokogiri
And I received the following error.
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.8-x86-mingw32/lib/nokogiri/2.2/nokogiri.so
Then when the installation was unsuccessful I tried inserting the following line into my Gemfile
gem 'nokogiri', '~> 1.6', '>= 1.6.6.2'
This was also unsuccessful
however even after I have removed gem 'nokogiri', '~> 1.6', '>= 1.6.6.2'
from the Gemfile I still receive the same error?
After receiving this error I also have not been able to do anything else in rails eg: now when I try to start a new rails project I get the following error
C:\Sites>rails new app
C:/RailsInstaller/Ruby2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:308:in `to_specs': Could not find 'nokogiri' (>= 1.5.9) among 200 total gem(s) (Gem::MissingSpecError)
...
running bundle
gives me the following error
Errno::EACCES: Permission denied @ rb_sysopen - C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.8-x86-mingw32/lib/nokogiri/2.2/nokogiri.so
...
An error occurred while installing nokogiri (1.6.8), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.8'` succeeds before bundling.
I have tried using
gem install nokogiri --prerelease
I have tried
gem uninstall nokogiri
I have also tried
-Source "http://ift.tt/294AzKV"
How do I fix this issue or revert back to rails before I had these issues?
I have looked everywhere and I can't find an effective solution to this. If there is any more information you require about this please ask in the comments and I'll do my best to give an informative answer.
Thanks
Aucun commentaire:
Enregistrer un commentaire