I'm pretty deep into a project, I have deployed a version of it on heroku which demanded I update my ruby version to complete my setup. After successfully completing that process I went back to my project to continue development and tried to save some variables using
EDITOR='code --wait' rails credentials:edit
and I get...
➜ $EDITOR='code --wait' rails credentials:edit
=> Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
When I run the sudo command I get successful response but when I try to run EDITOR='code --wait' rails credentials:edit I get the same error.
I've tried to work through some solutions which lead me to try
gem install rails
but then I get this error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/3.0.0/gems/rails-6.1.3.2/README.md
As I can not save the variable or even start a new rails project I am pretty much stuck and will appreciate any suggestions or guidance.