This made it work, and I proceeded with: $ ~/.dotfiles/bin/install_requirements
While installing I did run in to this problem: There was an error while trying to write to /Users/robertlee/.dotfiles/requirements/Gemfile.lock. It is likely that you need to grant write permissions for that path.
I also tried to restart my computer and rerun the commands and came across: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. /Users/robertlee/.dotfiles/bin/install_requirements: line 101: bundle: command not found
What should I do so that I may have my machine set up to start the Alpha Curriculum?
Thanks for the reply Michael. I seem to be lost in the explanations in the thread you provided. I went through the stack overflow posts as well and I just don’t seem to get it to work.
By the way, I did try running ~/.dotfiles/bin/install_requirements again and this came up during the ruby installation: There was an error while trying to write to '/Users/robertlee/.dotfiles/requirements/Gemfile.lock'. It is likely that you need to grant write permissions for that path.
Is there anything else I should try?
I also ran sudo chown -R "$USER" ~/.rbenv as mentioned in the troubleshooting section for installing dotfiles. Then I reran ~/.dotfiles/bin/install_requirements. Still having the same problem.
This command:
echo ‘export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"’ >> ~/.bash_profile
and this command:
echo ‘eval “$(rbenv init -)”’ >> ~/.bash_profile
may do the trick. They will drop the rbenv path and init into your bash_profile. This tells your terminal which ruby version to use through rbenv, which will also grant you write permissions for that path/version.
Tried your suggestion and still running in to the same problem when I run $ ~/.dotfiles/bin/install_requirements
Does it matter if I’ve previously installed dotfiles when I was trying to take a coursera course? I don’t know what I was doing but I vaguely remember installing hidden dotfiles as well as a bash profile.
Another note (I’m not sure if this is relevant), I did also try to run ~/.dotfiles/bin/install_dotfiles and got:
/Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:74:in `write': Permission denied @ rb_sysopen - /Users/robertlee/.dotfiles/dot/atom/.diff_config.cson (Errno::EACCES)
from /Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:74:in `compile_diff'
from /Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:47:in `diff'
from /Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:51:in `changed?'
from /Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:121:in `select'
from /Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:121:in `main'
from /Users/robertlee/.dotfiles/bin/.install_dotfiles.rb:161:in `<main>'
You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
The two rbenv commands didn’t work either, and now I can’t download Rails for the same reason. I’ve been following the steps in this answer to a similar problem, but after calling
which ruby
it says
/usr/bin/ruby
And I can’t get the
.rbenv/shims
on my path before any directory where it would look for Ruby …
Then trying rbenv install 2.2.3 I get
rbenv: no such command `install’
It seems like a lot of people have been having problems with this… Does anybody from a/A know the best solution to this? I’d hate to get to class in two weeks and still be dealing with this.
After a lot of trial and error it looks like I got it fixed! In case anyone else is also going through this headache, I believe what did it was fully un-installing rbenv, and deleting all rbenv lines in my bash folder, then re-installing per the rbenv directions on github.
Then run the two commands above, and be sure to exit out of your terminal and open it back up before giving it a try.