Environment Setup Changing Ownership

Hi all,

I just started trying to setup the environment and have encountered an issue with the ownership change of usr/local. This is from the terminal:

Williss-MacBook-Pro:~ raynor$ sudo chown -R “$USER” /usr/local
sudo: /etc/sudoers is owned by uid 501, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

If anyone can give me advice about what’s going wrong or what I should do I would greatly appreciate it.
Thanks!

Hi Raynor, are you running OS X High Sierra (10.13.1)?

Yep, I’ve read this command isn’t allowed in that OS version, but I’m unsure what to do about it.

I just tried moving on to installing the requirements and got a similar result of :

~/.dotfiles/bin/install_requirements

sudo: /etc/sudoers is owned by uid 501, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

install_requirements failed: Could not install Homebrew

But I’m hopeful that this is just because I haven’t managed to change the usr/local ownership for homebrew.

We are currently in the process of updating the dotfiles so that they play nice with High Sierra. For now, let me ask: Do you have a backup of your system from before you upgraded to High Sierra? If so, the easiest thing to do would actually be to go back to the previous version and installing the dotfiles from there.

Ok, thanks for the info. I don’t have a backup but I can try to find another way to downgrade back to the older version. Do you know approximately when the dotfiles should be updated to work with High Sierra? Ideally I wouldn’t want to go through the process of changing it back if they’ll be updated within the next couple days or so.

Unfortunately, we don’t have a timeline for when the dotfiles will be updated. But in the meantime, feel free to use this: https://c9.io/

No worries, I reset back to (not-high) sierra and got everything set up. But now I’m wondering, in Method Definition it says to “type the following into the shell” (with respect to a ruby method), what shell is it referring to?

I’m assuming a ruby shell of some kind was installed in the environment setup, but how do I access it to start writing ruby programs? I’ve found typing “irb” into the terminal turns it into a ruby environment of sorts, but I don’t think that’s what we’re supposed to be doing.

I have also downloaded the Methods exercises and opened it in Atom, I managed to run the tests by doing “bundle install” and then “bundle exec rspec”, but whenever I try to edit the files in “methods.rb” I get “[Linter] Error running RuboCop”. I dealt with this by disabling the Linter Rubocop package in Atom, which works for now, but feels more like avoiding the problem than dealing with it since if I never need Linter/RuboCop then I’ll be in trouble again.

Thanks!

Hi Raynor,

Sorry for the slow response.

  1. For most purposes, the shell is the same thing as the terminal. So when the instructions tell you to run something in the shell, just run it in the terminal.

  2. Have you tried updating RuboCop, or uninstalling it and installing it again?

Best,

Matthias

No worries,

Ok, I’ll keep that in mind, so I would want to run IRB first, and then just run the ruby commands as instructed in the terminal right?

And I tried reinstalling it once but it’s giving me the same issue, I’m just keeping it disabled for now since I don’t need it for anything immediate, but I’m not sure what to do to fix it if it’s needed in the future.

Thanks,
-Willis

Yes, if they are Ruby commands, then run irb (or pry, if you have it installed) first and then run the Ruby commands. irb and pry are Ruby runtimes where you can run Ruby code line by line.

Yes, keep RuboCop disabled for now. We can take a look at your computer to try to fix it when you enter the program.