Installing dotfiles Error!

Hello, I am sure this topic has been talked about to death so sorry if I am repeating anything!

Upon trying to install the dotfiles, I received the following error:

(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:ineval’
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in result' from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:43:intext’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:74:in compile_diff' from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:47:indiff’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:51:in changed?' from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:121:inselect’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:121:in main' from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:161:in

I looked to see if there were any errors when installing the requirements and all I saw was this:

install_requirements: Upgrading outdated brew formulae…
Error: git 2.12.2 already installed
Error: heroku 5.6.28-2643c0a already installed
Error: qt5 5.8.0_2 already installed
Error: rbenv 1.1.0 already installed
Error: ruby-build 20170405 already installed

How should I tackle the error that I am currently getting? Thank you very much.

I tried to move on but I’m already stuck on the first project. I created a git clone but when I tried to use the bundle command, the terminal states that the command is not found. How to proceed?

Hey ckim,

Take a look around at the other installation questions on the forum. The most popular solution has been to assure that you have the .bashrc and .bash_profile file copied and renamed correctly in your root folder. You can find the files in the dot folder of the .dotfiles repo. If you are still having issues we can setup a Google Hangout and I will help you get your environment setup for the Alpha Course.


Hi Kevin,

I tried to peruse through the other installation questions in the forums but was unable to find a definitive solution. Currently, the .bashrc and .bash_profile file are in the dot directory, which is in the .dotfiles directory, which is in my User directory. Is this not the correct location? When you say move the .bashrc and .bash_profile into the root folder, do you mean move these folders into my Macintosh HD? Sorry for the questions.

No need to be sorry for the question, that is what we are here for :smiley:

When you say “Do you mean move these folders into my Macintosh HD?” The answer is YES. Move both of those files into your root directory and make sure they have the . in front of their filename. So you should have: ~/.bashrc and ~/.bash_profile files. Then restart Terminal and rerun the installation requirements script. Let me know if you then still issues running bundle install or bundle exec rspec on your first project.


Thanks for the prompt response Kevin!

So i copied and pasted it into the Macintosh HD but I can’t rename the files to have the . in front of the names. I get an error: “You can’t use a name that begins with a dot because these names are reserved for the system”. This is my first time using MacOS so please forgive me for my ignorance!

No worries,

Now that they are in place let’s use Terminal commands to rename them. In Bash we use the mv or move command to rename files as well as relocate them (renaming is just relocating to the same place with a different filename). The mv command takes two parameters (from, to). Try these commands:

mv ~/bashrc ~/.bashrc
mv ~/bash_profile ~/.bash_profile

Hi Kevin,

I did the commands and I used the gem install bundler. I then tried to use bundle install but it could not view gem. See below.

What should I do now?

Getting there!

Bundle Install looks for a Gemfile to read and install all of the described gems. These gemfiles are present in every Ruby project you will do on App Academy Online. So make sure you are working in the project folder when you run the bundle install command. Use the cd command to change directories into your ruby project folder and try the bundle install command there.

Perfect! Thank you very much Kevin. I now get this.

I think I can take it from here. But I do have to ask (me being so new to macos), why does it say master now? I noticed that it no longer states Chris’s-macbook-pro but now only gives me ~$ when I open a terminal. How do I fix this? So sorry!

Great Job Chris,

The .bashrc file describes Terminal settings. If you look into the file you will see the following:

export PS1="$RED\w$WHITE\$(__git_ps1)$RED\$$RESET "

PS1 stands for “Prompt String 1” or “Prompt Statement 1” which describes what that Terminal prompt you are talking about looks like. There are all sorts of ways to customize this!

One common customization made to this prompt string is what git branch you are currently on if you are working inside of a git repository. You will learn more about Git branches in the main course but feel free to Google around. They make it easier for multiple developers to collaborate on projects and allow us to work on different pieces at a time. During the alpha course you can make all of your project changes on the default branch called master.

Let me know if you have any more questions!

Hi Kevin,

Thank you so much for the help. So should I skip this error then and move on through the alpha coursework?

(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:ineval’
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in result’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:43:intext’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:74:in compile_diff’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:47:indiff’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:51:in changed?‘
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:121:inselect’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:121:in main’
from /Users/chriskim/.dotfiles/bin/.install_dotfiles.rb:161:in’

Yeah we can figure out Javascript stuff when you get into App Academy.

Thanks a whole bunch Kevin. Last and final question! (I hope). I will be sure to read more into the bashrc tonight.

So before getting things to finally work, my terminal used to have this:
Last login: Sat Apr 8 19:40:30 on ttys000
Chriss-MBP:~ chriskim$

Now my terminal looks like this after doing the instructions:
Last login: Mon Apr 10 18:25:29 on ttys000

Just to confirm, having the “Chriss-MBP:~ chriskim$” disappear is normal correct? Sorry for the paranoia…I will march on in the alpha course!

Yes, continue with the alpha course. The terminal prompt changed when you moved the .bashrc file over.

Hey Kevin, I’m having a similar problem where my .bashrc file was outside the .dotfiles directory but I can’t seem to find a .bash_profiles file anywhere. In reality my real problem is linter isn’t working properly in atom but I’m working backwards to try to figure out why. I’m on ubuntu if it makes a difference in this situation.

Actually I’m not sure if it’s Linter or not, but in the second assignment only hello.rb has any instruction. Is that intentional or should should temperature.rb have anything written in it already?

Hey Sean,

In these early stages of learning before you get into App Academy go ahead and disable your linter in Atom if you have one. You can do so by going to Atom - preferences - packages and disabling linter-rubocop.

Some /lib files are supposed to be blank in the rspec projects, look at the corresponding spec files for instructions. We will look into putting some comments in the lib files to avoid future confusion.

The Ubuntu operating system does not use a .bash_profile, you should be good to go with just the .bashrc :smiley:

Let me know if that answers all your questions and you are able to progress through the alpha course. Thanks!

Yeah answers my questions! Thanks for the clarification.