# NonaTemplate :: Gotchas

The following are a list of possible gotchas while trying to build the application.

## Bundler won't install

If Bundler won't install after running `bundle install` due to the following error:

" An error occurred while installing unf_ext (0.0.7.6), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.6' --source 'https://rubygems.org/'` succeeds before bundling. "

Try run `npm i` then follow the steps below:

1. Install rvm stable with Ruby: `\curl -sSL https://get.rvm.io | bash -s stable --ruby`
2. Run the line of code suggested on the terminal `source etc`
3. Update your gem: `gem update --system`
4. Reinstall gem: `gem install bundler` # This may require sudo depending on your Ruby setup
5. Yes, overwrite
6. Update bundler: `bundler update --bundler`
7. `npm run init` initialize env files from local tpl
8. iOS Setup:
   1. `cd ios`
   2. `bundle exec pod install` install iOS Pods
   3. `cd ..` return to root folder
9. `npm run start` start bundler
10. `npm run ios` start app

## App won't build

If the app won't rebuild follow this:

1. Checkout a commit you know works
2. Open the project in xCode and clean derived data.
3. Deintegrate pods by running `cd ios && bundle exec pod deintegrate && cd ..`
4. Run`bundle exec pod install`
5. Optional: if Cocoapods has been updated run `bundle install`
6. Run `npm run start:reset`

If Android emulator build fails with 'no online device' or 'no authorized device'

1. Run `adb kill server'
2. Click on Wipe Data option from avd Actions menu in android studio

## Bundler won't connect to a physical iOS Device

Ensure that the device and Macbook are on the same wifi network and plugged in with the USB cable.
[See docs for more info](https://facebook.github.io/react-native/docs/running-on-device)
