Also having problems installing Dotfiles

Having a very similar issue to the problem Ravi posted about, except my error was slightly different. I have wasted a bit of time trying to figure this out, so some help would be greatly appreciated. Here is the output I received:

(erb):21:in ``': No such file or directory - npm (Errno::ENOENT)
	from (erb):21:in `text'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `eval'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `result'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:43:in `text'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:74:in `compile_diff'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:47:in `diff'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:51:in `changed?'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:121:in `select'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:121:in `main'
	from /Users/apple/.dotfiles/bin/.install_dotfiles.rb:161:in `<main>'

I also tried running npm install npm -g , as Kevin had asked Ravi to try, but I only get an error that the command is not found.

Hey Tyler,

It looks like there is an issue with the dotfiles not correctly updating bashrc/bash_profile files. Here is a brief explanation and what you should try in order to fix the error you are having.

The .bashrc and .bash_profile files are responsible for configuring bash settings. We use these files to do things like change the prompt (the text displayed before running a command), make aliases (command shortcuts) and set the PATH for our commands.

Setting the PATH for a command is like telling bash where to go get the instructions to run that command. For example, whwn we type ruby hello_world.rb to run a ruby script, the terminal needs to know where to find Ruby installed on your machine. This is why you will find this line in the .bashrc file:

export PATH="$HOME/.rbenv/bin:$PATH"

So to fix the errors, make sure your bash files look like the ones found in the .dotfiles repo.

Notice that all the .bash_profile file does is load everything in the .bashrc file which is what you want. This blog post explains the difference. Make sure these files are in your root directory, so their location should be ~/.bash_profile and ~/.bashrc respectively.

Lastly, make sure to restart Terminal in order for the bash settings to take effect. Let me know if you have any questions. Thanks!

Hi Kevin,

This solution is still not working for me. Can we please schedule a google meeting ASAP?


Following Kevin’s tip, I tried the following two commands to overwrite my bashrc and bash_profile files:

cp ~/.dotfiles/dot/bashrc ~/.bashrc
cp ~/.dotfiles/dot/bash_profile ~/.bash_profile

Then I restarted the terminal and installed the requirements and the configuration files (dotfiles) without problems. Everything seems to be working now except the terminal always says
"__git_ps1: command not found"
after I type any commands…

Hope this helps. And if you know how to resolve the previous issue, let me know!



Still haven’t resolved this, but for others working on it, I found you can review all files including the hidden files (dot files) by typing:
ls -al

You can also open these bash files from Terminal (since you can’t find them in Finder) using

cd ~
open .bashrc
open .bash_profile

Mine opened in TextEdit and I was able to copy and paste from the repo