Error occurred while installing nokogiri (1.7.0.1) and Bundle cannot continue.

1,035 views
Skip to first unread message

Jonathan Pan

unread,
Feb 23, 2017, 2:01:42 PM2/23/17
to nokogiri-talk
I use Windows 10 x64, Ruby 2.2.3, Rails 5.0.1.

I installed nokogiri outside of my Rails application and completed a script without errors.  Now I'm trying to run it inside my application and bundle is failing.

bundle
"Errno::EACCES: Permission denied @ rb_sysopen -
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.7.0.1-x64-mingw32/lib/nokogiri/2.2/nokogiri.so
An error occurred while installing nokogiri (1.7.0.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.7.0.1'` succeeds before bundling."

gem install nokogiri -v '1.7.0.1'
" ERROR: While executing gem ... (Errno::EACCES)
Permission denied @rb_sysopen - C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.7.0.1-x64-mingw32/lib/nokogiri/2.2/nokogiri.so"

gem install nokogiri -v '1.7.0.0'
Installs succesfully


Now I have gem 'nokogiri', '= 1.7.0.0'
bundle update
And now it has no errors.

Not sure if this is something on my end or nokogiri's but I'll see if this version will keep working for me.

Aaron Patterson

unread,
Feb 23, 2017, 2:07:37 PM2/23/17
to nokogi...@googlegroups.com
Hi Jonathan,

Looks like you might have some permissions issues.  Can you check the permissions on the file (or possibly one of the directories) C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.7.0.1-x64-mingw32/lib/nokogiri/2.2/nokogiri.so ?

--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.
To post to this group, send email to nokogi...@googlegroups.com.
Visit this group at https://groups.google.com/group/nokogiri-talk.
For more options, visit https://groups.google.com/d/optout.

Lars Kanis

unread,
Feb 23, 2017, 2:47:27 PM2/23/17
to nokogi...@googlegroups.com
"Permission denied" is typically raised, when the mentioned file is currently in use by another process. This is due to the (stupid) implicit locking that Windows enforces when a file is mapped into a process. Please check for another ruby process or reboot the OS.
--
Regards, Lars

Jonathan Pan

unread,
Feb 25, 2017, 3:31:04 PM2/25/17
to nokogiri-talk
Permissions were fine I think it may be what Lars said, another process was using it.  Thanks.

Kevin Cooper

unread,
Dec 19, 2019, 10:55:00 AM12/19/19
to nokogiri-talk
Same issue for me on Linux when deploying with Capistrano, solution was to reboot the machine. Thanks for the advice.
Reply all
Reply to author
Forward
0 new messages