In my modules directory I have some modules from Puppet Forge, among others e.g. puppetlabs/stdlib.
I tried the module upgrade with the following command:
puppet module --modulepath . upgrade puppetlabs-stdlib --ignore-changes.
But I received the following error message:
Error: Permission denied # rb_file_s_rename - (/home/pk/.puppet/cache/puppet-module/cache/tmp20220620-5150-1b9vqt0/puppetlabs-stdlib-5.2.0, /home/pk/.puppet/cache/puppet-module/cache/puppetlabs-stdlib20220620-5150-1be31tk)
What could be the reason for the error and how can I fix it?
Detailed: Commands and terminal output
$ puppet module --modulepath . upgrade puppetlabs-stdlib
/usr/lib/ruby/vendor_ruby/puppet/util.rb:50: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
Notice: Preparing to upgrade 'puppetlabs-stdlib' ...
Notice: Found 'puppetlabs-stdlib' (v5.1.0) in /mnt/c/Users/pk/Puppet_Project/modules ...
Error: Could not upgrade module 'puppetlabs-stdlib' (v5.1.0 -> latest)
Installed module has had changes made locally
Use `puppet module upgrade --ignore-changes` to upgrade this module anyway
Why changes should have been made in the module puppetlabs-stdlib is not clear to me, maybe a converted line end or a changed encoding, the change should be discarded in any case.
$ puppet module --modulepath . upgrade puppetlabs-stdlib --ignore-changes
/usr/lib/ruby/vendor_ruby/puppet/util.rb:50: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
Notice: Preparing to upgrade 'puppetlabs-stdlib' ...
Notice: Found 'puppetlabs-stdlib' (v5.1.0) in /mnt/c/Users/pk/Puppet_Project/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Error: Permission denied # rb_file_s_rename - (/home/pk/.puppet/cache/puppet-module/cache/tmp20220620-5150-1b9vqt0/puppetlabs-stdlib-5.2.0, /home/pk/.puppet/cache/puppet-module/cache/puppetlabs-stdlib20220620-5150-1be31tk)
/usr/lib/ruby/2.5.0/fileutils.rb:471:in `rename'
/usr/lib/ruby/2.5.0/fileutils.rb:471:in `block in mv'
/usr/lib/ruby/2.5.0/fileutils.rb:1463:in `block in fu_each_src_dest'
/usr/lib/ruby/2.5.0/fileutils.rb:1479:in `fu_each_src_dest0'
/usr/lib/ruby/2.5.0/fileutils.rb:1461:in `fu_each_src_dest'
/usr/lib/ruby/2.5.0/fileutils.rb:460:in `mv'
/usr/lib/ruby/vendor_ruby/puppet/module_tool/applications/unpacker.rb:86:in `move_into'
/usr/lib/ruby/vendor_ruby/puppet/module_tool/applications/unpacker.rb:13:in `unpack'
/usr/lib/ruby/vendor_ruby/puppet/forge.rb:210:in `unpack'
/usr/lib/ruby/vendor_ruby/puppet/forge.rb:174:in `prepare'
/usr/lib/ruby/vendor_ruby/puppet/module_tool/applications/upgrader.rb:189:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/module_tool/applications/upgrader.rb:189:in `each'
/usr/lib/ruby/vendor_ruby/puppet/module_tool/applications/upgrader.rb:189:in `run'
/usr/lib/ruby/vendor_ruby/puppet/face/module/upgrade.rb:73:in `block (3 levels) in <top (required)>'
/usr/lib/ruby/vendor_ruby/puppet/interface/action.rb+eval[wrapper]:264:in `upgrade'
/usr/lib/ruby/vendor_ruby/puppet/application/face_base.rb:247:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:383:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:665:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
/usr/bin/puppet:5:in `<main>'
$ ll ~/.puppet/cache/puppet-module/cache/
total 0
drwxr-xr-x 1 pk pk 4096 Jun 20 12:24 ./
drwxr-xr-x 1 pk pk 4096 Jun 20 12:24 ../
You see, I am working with WSL on Windows.
I think that warning: Insecure world writable dir /mnt/c in PATH, mode 040777 should not cause the error Permission denied # rb_file_s_rename. Looking at the cache folder, my user has write permissions, how the permissions of the chache files are set I don't know exactly unfortunately.
Not all upgrades fail
I also upgraded the derdanne/nfs package in the same way, without any problems.
$ puppet module --modulepath . upgrade derdanne-nfs --ignore-changes
/usr/lib/ruby/vendor_ruby/puppet/util.rb:50: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
Notice: Preparing to upgrade 'derdanne-nfs' ...
Notice: Found 'derdanne-nfs' (v2.1.2) in /mnt/c/Users/pk/Puppet_Project/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Upgrading -- do not interrupt ...
/mnt/c/Users/pk/Puppet_Project/modules
└── derdanne-nfs (v2.1.2 -> v2.1.8)
The message "Installed module has had changes made locally" suggests that at some point a file or directory in the module structure has been changed by a local user, if that local user wasn't the owner of the home directory or the change was done by someone who was root or sudo then you're going to get these permissions problems.
I doubt checking "~/.puppet/cache/puppet-module/cache/" will help, your problem is likely to be buried way down under /mnt/c/Users/pk/Puppet_Project/modules/stdlib and there are a lot of files under there.
I would try the following;
Copy /mnt/c/Users/pk/Puppet_Project/modules/stdlib to some backup location as it's probably not possible to figure out what's been changed on this module and you may need to refer back to it.
Delete the module from the system, rm -rf /mnt/c/Users/pk/Puppet_Project/modules/stdlib.
Reinstall the original version to get you back to a reasonable state puppet module --modulepath . install puppetlabs-stdlib --version 5.1.0.
Then run your upgrade command puppet module --modulepath . upgrade puppetlabs-stdlib.
But it's worth being really careful about this, the current version of stdlib is 8.2.0 and a lot of modules haven't caught up with this version yet. If you go to that version you're likely to find other modules with a dependency of stdlib below version 8 so I'd probably run puppet module --modulepath . upgrade puppetlabs-stdlib --ignore-changes --version 7.1.0 as most modules on the forge have a version that'll be fine with version 7.
Related
I tried Github pages on Friday and found it great so decided to install Jekyll locally (Windows 10) so I could build and test offline. After spending almost a day and trying multiple recipes (from theserverside.com, jekyllrb.com, etc) for how to install Jekyll I finally got jekyll -v to work. (Note that the instructions I found weren't bad but probably just out of date. People need to updates their blogs, or better people should stop changing how things are set up!)
However, now when I try to serve a test site I get a Segmentation fault (as below). I have tried starting again from scratch several times and even strangely get different results but have never gotten as far as serving the site.
$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]```
$ jekyll -v
jekyll 4.2.2
$ jekyll new myblog
...
$ cd myblog
$ bundle exec jekyll serve
Configuration file: e:/Work/tmp/Daily/blog/myblog/_config.yml
Source: e:/Work/tmp/Daily/blog/myblog
Destination: e:/Work/tmp/Daily/blog/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
-- Control frame information -----------------------------------------------
c:0033 p:---- s:0182 e:000181 CFUNC :compile_data_context
c:0032 p:0314 s:0177 e:000176 METHOD C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43
...
[+576 more lines of backtrace and runtime info - available on request]
Thanks for any help you can give me to get Jekyll working.
BTW I don't like to complain but getting Ruby and Jekyll installed and running has been a royal pain. Maybe I have been spoilt with Go which literally took less than 10 minutes to install and have a running program (though calling C from Go (using CGO) took me a few hours to get working). Moreover, if Jekyll was written in Go it would a simple matter of downloading a single jekyll.exe - ie a few minutes instead of days (or however long it takes to get this working).
Update: I have tried lots of things with varying results but I never get as far as Jekyll serving the site. I don't know enough about Ruby and/or understand what the error messages mean to try to fix these things so I have now taken to documenting exactly what I tried and the result. Here are the last 4 things I tried and the result:
================================
Using Ruby 3.1.2.1 + Devkit (x64) and following instructions at https://jekyllrb.com/docs/installation/windows/ which run without error but then serving a test site has an error:
$ jekyll -v
jekyll 4.2.2
$ jekyll new myblog
...
New jekyll site installed in D:/myblog.
$ cd myblog
$ bundle exec jekyll serve
Configuration file: D:/myblog/_config.yml
Source: D:/myblog
Destination: D:/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 1.829 seconds.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'D:/myblog'
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require':
cannot load such file -- webrick (LoadError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:100:in `process'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
from C:/Ruby31-x64/bin/jekyll:32:in `load'
from C:/Ruby31-x64/bin/jekyll:32:in `<main>'
=======================================
Using Ruby 3.1.2-1 and following instructions at https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/jekyll-install-windows-example-blog-tutorial after a lot of trial and error I eventually got jekyll serve to run but it said "generating feed" then stopped and there was no server running at http://localhost:4000.
=======================================
Using Ruby 3.0.4-1 (x64) and following instructions at https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/jekyll-install-windows-example-blog-tutorial I get to the very end but when I try to serve the a test site I get:
$ bundle exec jekyll serve
Configuration file: D:/myblog/_config.yml
Source: D:/myblog
Destination: D:/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.758 seconds.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'D:/myblog'
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
...
===================================
Using Ruby 2.7.0.1 and following instructions at https://gist.github.com/arthurattwell/281a5e1888ffd89b08b4861a2e3c1b35 I get as far as the ridk install and which fails:
$ ridk install
...
Which components shall be installed? If unsure press ENTER [1,2,3]
> sh -lc true
MSYS2 seems to be properly installed
Remove catgets to avoid conflicts while update ...
> pacman -Rdd catgets libcatgets --noconfirm
error: target not found: catgets
error: target not found: libcatgets
MSYS2 system update (optional) part 1 ...
> pacman -Syu --needed --noconfirm
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
ucrt64 is up to date
clang32 is up to date
clang64 is up to date
msys is up to date
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do
MSYS2 system update (optional) succeeded
MSYS2 system update (optional) part 2 ...
> pacman -Su --needed --noconfirm
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do
MSYS2 system update (optional) succeeded
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autoconf2.13 autogen automake-wrapper automake1.10 automake1.11 automake1.12 automake1.13 automake1.14 automake1.15 automake1.6 automake1.7 automake1.8 automake1.9 diffutils file gawk grep libtool m4 make patch pkg-config sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git
error: target not found: automake1.10
error: target not found: automake1.6
error: target not found: automake1.7
error: target not found: automake1.8
error: target not found: automake1.9
warning: file-5.41-4 is up to date -- skipping
warning: gawk-5.1.1-1 is up to date -- skipping
warning: grep-1~3.0-3 is up to date -- skipping
warning: sed-4.8-3 is up to date -- skipping
warning: wget-1.21.3-1 is up to date -- skipping
Install MSYS2 and MINGW development toolchain failed
Installation failed: pacman failed
I got it to work using the instructions at www.theserverside.com and installing Ruby 2.7.6
Note that the install of Ruby messed with msys/mingw and now when I try to debug my Go program I get this error:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib/libmsvcrt.a(/359): duplicate symbol reference: _unlock_file in both libgcc(.text) and libgcc(.data)
libgcc(.text): relocation target ___chkstk_ms not defined
libgcc(.text): relocation target atexit not defined
but I guess that is a new question
I have been stranded with this 5 hours today, and no online answers seem to exist for my problem....
I just installed .rvm and ruby + gem in order to start as a Shopify Developer. As a installed shopify-cli, and consequently log shopify version, I get this:
roger.rangel#Rogers-MacBook-Pro Current % shopify version
/Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:253:in mkdir': Permission denied # dir_s_mkdir - /Users/roger.rangel/.config/shopify (Errno::EACCES) from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:253:in fu_mkdir'
from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:231:in block (2 levels) in mkdir_p' from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:229:in reverse_each'
from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:229:in block in mkdir_p' from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:211:in each'
from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:211:in mkdir_p' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/vendor/deps/cli-kit/lib/cli/kit/config.rb:128:in write_config'
from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/vendor/deps/cli-kit/lib/cli/kit/config.rb:55:in set' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/lib/shopify-cli/context.rb:607:in update_time_of_last_check'
from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/lib/shopify-cli/context.rb:560:in new_version' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/lib/shopify-cli/core/entry_point.rb:13:in call'
from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/bin/shopify:33:in block in <main>' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:in handle_abort'
from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:21:in call' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/bin/shopify:32:in '
How can I just get rid of this problem???? I am new to web development :(
This sometimes happens when you have run some install command as root. That is, if you have for instance installed rvm using sudo for some command - which has put the ownership of a directory to the root user of your computer (remember that MacOS is essentially UNIX with a nice UI).
To solve it, in your terminal you have to run
sudo chown -R roger.rangel: /Users/roger.rangel/.config
Another possibility is that you just don't have that directory, in that case, again in your terminal
mkdir /Users/roger.rangel/.config
I'm getting "Permission denied" error when i am executing any command on terminal.
The macbook which I'm using is running on OS X 10.10.5, and also this macbook is provide by my company so it having some permission levels. But I made my login as admin login.
When i'm executing "pod setup —verbose" command I'm getting below errors
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `read': Permission denied - /Library/Ruby/Gems/2.0.0/specifications/terminal-notifier-1.6.0.gemspec (Errno::EACCES)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:644:in `block (2 levels) in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `block in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:658:in `each_normal'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:669:in `_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:822:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `find_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `matching_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:277:in `to_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/pod:22:in `<main>'
I tried almost all the solutions available, but I didn't get the solution. Please help he on this.
Update
If i use the commands with sudo i am getting below errors.
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:417:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
Usage:
$ pod COMMAND
CocoaPods, the Cocoa library package manager.
Commands:
+ cache Manipulate the CocoaPods cache
+ init Generate a Podfile for the current directory.
+ install Install project dependencies to Podfile.lock versions
+ ipc Inter-process communication
+ lib Develop pods
+ list List pods
+ outdated Show outdated project dependencies
+ repo Manage spec-repositories
+ setup Setup the CocoaPods environment
+ spec Manage pod specs
+ update Update outdated project dependencies and create new Podfile.lock
Options:
--silent Show nothing
--version Show the version of the tool
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:44:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
from /usr/bin/pod:23:in `load'
Try to update permission on CocoaPods
sudo chown -R $USER ~/Library/Caches/CocoaPods
sudo chown -R $USER ~/.cocoapods
Try running "pod install" and see if it fixed your problem.
If you still getting permission denied, try:
sudo chown -R $USER ./Pods
Also you might need to remove old podfile.lock before running pod install
Depending on the Pod Update you are trying to run, the original folder that was downloaded may not have given you read/write access. Navigate to that folder in Finder and right click to get info. Go to permissions and check to see that your user name is listed and have read/write access. If not add your user name and give yourself the rights.
I am running JetBrains RubyMine with rails 4.2.4, ruby 2.1.7, and am creating an application as part of a training project. I am trying to include SASS and am experimenting with certain stylesheets. I added SASS gems and import verbiage per SASS-rails documentation, and my application started throwing this (trace):
Errno::EACCES in Sessions#new
Showing H:/Development/RubyMine/DiceRollerWeb/app/views/sessions/new.html.erb where line #5 raised:
Permission denied # sys_fail2 - (H:/Development/RubyMine/DiceRollerWeb/tmp/cache/assets/development/sprockets/v3.0/dWWzdOdzonUK3KUkyL3m5nbzYnP4jQTIQVpW3bCJg3k.cache.55176684.7688.886554, H:/Development/RubyMine/DiceRollerWeb/tmp/cache/assets/development/sprockets/v3.0/dWWzdOdzonUK3KUkyL3m5nbzYnP4jQTIQVpW3bCJg3k.cache)
Rails.root: H:/Development/RubyMine/DiceRollerWeb
Application Trace | Framework Trace | Full Trace
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:525:in `rename'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:525:in `block in mv'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:1579:in `block in fu_each_src_dest'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:1595:in `fu_each_src_dest0'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:1577:in `fu_each_src_dest'
C:/Ruby21/lib/ruby/2.1.0/fileutils.rb:514:in `mv'
sprockets (3.4.0) lib/sprockets/path_utils.rb:277:in `atomic_write'
sprockets (3.4.0) lib/sprockets/cache/file_store.rb:108:in `set'
sprockets (3.4.0) lib/sprockets/cache.rb:210:in `set'
sprockets (3.4.0) lib/sprockets/cache.rb:136:in `set'
sprockets (3.4.0) lib/sprockets/legacy.rb:128:in `cache_set'
sass-rails (5.0.4) lib/sass/rails/cache_store.rb:13:in `_store'
And so on...
I have confirmed permissions for "Everyone" to full control on the tmp directory in my project. I did a rake tmp:cache:clear several times, without success. I've tried blowing away the directory entirely without success. This isn't a Unix environment, so running chmod and adjusting group:user rwx permissions is out of the question. Anyone run into this before?
Found a different solution:
In test/test_helper.rb, commented out the following line:
# parallelize(workers: :number_of_processors, with: :threads)
no parallell testing, no problem
I solved my own problem.
Permissions were due to the project files living on a server share. Once I moved project files to an available spot (permissions-wise) on local C:, my issues cleared up right away.
Will consider a Linux VM option for dev.
PS C:\Users\Roman> ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Program Files (x86)/Heroku/ruby-1.9.3'
dk.rb:86:in `rename': Permission denied # sys_fail2 - (C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1
/rubygems/defaults/operating_system.rb, C:/Program Files (x86)/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/defau
lts/operating_system.rb.20141106064922) (Errno::EACCES)
from dk.rb:86:in `update_gem_override'
from dk.rb:260:in `block (2 levels) in install'
from dk.rb:246:in `each'
from dk.rb:246:in `block in install'
from dk.rb:219:in `each'
from dk.rb:219:in `install'
from dk.rb:313:in `run'
from dk.rb:332:in `<main>'
Trying to install the devkit. "ruby dk.rb init" went without a hitch. Then this happens. Any ideas?
Currently, this is a problem with Ruby being installed to C:\Program Files\ without administator priviledges. For some reason, a copy of Ruby exists in my version of Heroku. This is autodetected by the devkit, and when it tries to install it there, it fails.
When ruby dk.rb init executes, a YAML file is created, called config.yaml, and all the paths of detected version of Ruby are added to it. By opening config.yaml and editing out the Heroku path, the problem was solved.
I hope this is helpful for other users.
Found the help I needed here.
Run cmd as an administrator and then run ruby dk.rb install command where have you extracted Devkit.
To run cmd as an administator:
type cmd in start menu
right click cmd.exe
click Run as administrator.
After successful completion of command, you will see something like below:
[INFO] Updating convenience notice gem override for 'C:/Program Files (x86)/Hero
ku/ruby-2.1.7'
[INFO] Installing 'C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/site_ruby/d
evkit.rb'