Environment Setup Issue

Hi there,

When attempting to run the ~/.dotfiles/bin/install_dotfiles command, I get this back:

(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/Ravi/.dotfiles/bin/.install_dotfiles.rb:43:intext’
from /Users/Ravi/.dotfiles/bin/.install_dotfiles.rb:74:in compile_diff' from /Users/Ravi/.dotfiles/bin/.install_dotfiles.rb:47:indiff’
from /Users/Ravi/.dotfiles/bin/.install_dotfiles.rb:51:in changed?' from /Users/Ravi/.dotfiles/bin/.install_dotfiles.rb:121:inselect’
from /Users/Ravi/.dotfiles/bin/.install_dotfiles.rb:121:in main' from /Users/Ravi/.dotfiles/bin/.install_dotfiles.rb:161:in

The only potential issue I could find with the previous command, ~/.dotfiles/bin/install_requirements, was this:

Considering PhantomJS found at /Users/Ravi/.nvm/versions/node/v6.10.0/bin/phantomjs
Looks like an npm install -g
Could not link global install, skipping…

Thanks for any help!

Hi Ravi,

Hard to tell exactly what the problem might be from these errors but we need the install_requirements to run successfully before we can run the install_dotfiles. So it looks the error is something related to installing npm which stands for Node Package Manager and is used to install javascript packages on your machine just like we use gems in Ruby.

Try running npm install npm -g and let me know if you hit any errors. If so, we will schedule a Google Hangout and get everything resolved. You will be fine to continue through this Alpha course though without npm.

Let me know if you have any related questions. Thanks!

Hi Kevin,

Thanks for your help. Here’s what I got :
Ravis-MacBook-Pro:~ Ravi$ npm install npm -g
-bash: npm: command not found

I tried running through the environment setup instructions again and noticed this error during the ~/.dotfiles/bin/install_requirements step:

Fetching: bundler-1.14.6.gem (100%)
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Fetching gem metadata from https ://rubygems.org/… #I added a space in each of these links, as discourse won’t let me put more than two links in this reply as I’m a new user.
Fetching version metadata from https ://rubygems.org/…
Fetching dependency metadata from https ://rubygems.org/.
Resolving dependencies…
Bundler could not find compatible versions for gem “ruby”:
In Gemfile:

rails (~> 5.0.1) was resolved to 5.0.1, which depends on
  ruby (>= 2.2.2)

One additional note: I started going through “A Ruby Project.” I can get the tests to pass, but I keep getting the following error:
Error: Failed to spawn command rubocop. Make sure rubocop is installed and on your PATH
Error: Failed to spawn command rubocop. Make sure rubocop is installed and on your PATH
at /Users/Ravi/.atom/packages/linter-rubocop/node_modules/atom-linter/lib/helpers.js:102:24
at process._tickCallback (internal/process/next_tick.js:103:7)

Thanks again for your help Kevin.

Hi Ravi,

Glad to help, I sent you an invite for a Google Hangout. Let me know if that time does not work for you. We will talk through the setup and see if we can get everything working. Thanks.

Hi again,

After we chatted, I tried running the ~/.dotfiles/bin/install_dotfiles command, and got the same error as before. I wasn’t sure if this was still a necessary step after what we did before, but I’ve been going through a little more of the prep and got to RSPEC introduction, which mentions navigating into the exercises directory. I don’t have any such directory, so I’m guessing there’s stuff I’m still missing.

Hi Ravi,

Ignore the mention of the exercises directory in the working with rspec reading. We will be removing this task. The installation requirements are purely for environment setup and do not include any content. If you can successfully write ruby, bundle install and run RSPEC tests, then you are good to go for completing the Alpha course.

We can resolve any Javascript issues in your first weeks at App Academy. Let’s setup a hangout if you are having any trouble that is preventing you from taking the Alpha Course online.

Hi Kevin,

I got the same error as Ravi when trying to install requirements, preventing me from installing dotfiles:

install_requirements: Ruby v2.3.1 set as default version.
install_requirements: Installing bundler and gems…
install_requirements: Press enter to continue.
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
/Users/anastassia/.dotfiles/bin/install_requirements: line 101: bundle: command not found
install_requirements: Gems installed

There’s contradicting recommendations on what to do on stackoverflow; how did you solve this?

I also had the same installation issue on my mac. I’m going to try to work on the other material tomorrow regardless, but can we also schedule a google session? I want to be able to work through the alpha curriculum without and hiccups.


I’ll just leave this here in case anyone else encounters the same problems. I got it to work by reinstalling Xcode from the App Store and after that everything ran smoothly. Hope this helps!


Thanks Joey, I’ll give that a shot tonight.

Still a no go here. Kevin, can we try to get me set up via google?

Hey Everyone, apologies for the late response, I have been out sick. Anyone having the (Gem::FilePermissionError) should check out the answer to Tyler’s question. We have to make sure we are accessing the correct instructions for the gem command located in the ruby installation under our ruby version manager called rbenv.

You will know the path is set correctly if you type which ruby in your terminal and get: Users/kmccall/.rbenv/shims/ruby where instead of my username you will see yours. The important part is that it is under .rbenv/shims NOT /usr/bin/ruby.

Get those bash files in there correctly, restart Terminal and let me know if anyone is still having issues. Thanks!