So I really messed up this ... I was working on a rail application and wanted to go back to the previous commit. I opened a new shell and forgot cd in my projects folder, so I ran "git reset --hard" and then "git clean -fd" in my user directory. I noticed before everything went away, but here is what was deleted:
bash-3.2$ git clean -fd Removing .CFUserTextEncoding Removing .Trash/ Removing .Xauthority Removing .adobe/ Removing .bash_history Removing .bash_profile Removing .bundle/ Removing .config/ Removing .cups/ Removing .dropbox/ Removing .fontconfig/ Removing .gem/ Removing .gitconfig Removing .guard_history Removing .heroku/ Removing .irb-history Removing .irb_history Removing .lesshst Removing .macports/ ^C
I managed to save my project in this shell, but I (now understood stupidly) thought that rebooting my computer would be better if I realized that my rails and package commands do not work in another shell. Unfortunately, I lost this working shell, which through research I would understand would have helped.
What has been done, and I'm trying to fix everything, but something that I can’t get is setting the ruby. I use rbenv to install ruby, but even after installing it, it will not be registered in any shell:
-bash-3.2$ rbenv local 2.1.1 -bash-3.2$ ruby -v -bash: ruby: command not found
I'm a little inexperienced when it comes to the terminal, and I'm worried. I am wondering if I should restore factory settings. My important images and documents are backed up, but I do not use a time machine.
I do not know if this is just a ruby, that the problem, so far nothing else has been a problem, but I would appreciate any help in solving this problem!
EDIT
So, now I understand that the problem was removing my bash_profile, which had all kinds of effects strikes. I really don’t know how to fix or reset it .... I try to uninstall everything and reinstall it, but it’s hard for me to understand that. I tried to install ruby ​​through Mac ports that worked, but it did not send a message to rbenv.