# Getting error when trying to perform migrations on Mac OS X for development

**URL:** https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825
**Category:** Development
**Created:** [8월 18, 2016, 5:19오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825 "2016-08-18T17:19:35Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [8월 18, 2016, 5:19오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/1 "2016-08-18T17:19:35Z")

</div>

When I get to the stage whereby I should create DB in postgres, I get an error saying the role " " does not exist.

Anyone know what the issue is ?

 ![](https://global.discourse-cdn.com/meta/original/3X/a/8/a8acf521be0d73434c0c37ce3c3eac8440637e03.png)

---

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [8월 18, 2016, 5:49오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/2 "2016-08-18T17:49:33Z")

</div>

Not to worry, I needed to create another DB superuser with:

`CREATE USER username SUPERUSER;`

---

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [8월 18, 2016, 6:40오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/3 "2016-08-18T18:40:28Z")

</div>

I have ran bundle install successfully. However when I attempt to run:

`bundle exec rake db:migrate db:test:prepare db:seed_fu`

I then receive errors:

```plaintext
Kuyashis-MacBook-Pro:discourse Kuyashi$ bundle exec rake db:migrate db:test:prepare db:seed_fu
rake aborted!
LoadError: cannot load such file -- memory_profiler
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/Users/Kuyashi/discourse/config/initializers/006-mini_profiler.rb:7:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `block in load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/Kuyashi/discourse/config/environment.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/application.rb:328:in `require_environment!'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.7.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/Library/Ruby/Gems/2.0.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

```

Could anyone assist please ?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [8월 18, 2016, 6:51오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/4 "2016-08-18T18:51:31Z")

</div>

Hmm. Did you

```
 bundle install

```

?

---

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [8월 18, 2016, 7:01오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/5 "2016-08-18T19:01:37Z")

</div>

@pfaffman yes, when ran `bundle install` I got:

`Bundle complete! 99 Gemfile dependencies, 185 gems now installed. Use `bundle show [gemname]` to see where a bundled gem is installed.`

---

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [8월 18, 2016, 7:16오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/6 "2016-08-18T19:16:54Z")

</div>

.. but that was before running:

`bundle exec rake db:migrate db:test:prepare db:seed_fu`

I still get the above error even though it says bundle completed ..

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [8월 18, 2016, 7:27오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/7 "2016-08-18T19:27:03Z")

</div>

Try doing:

```
cd ~/discourse
source ~/.bashrc
bundle install
bundle exec rake db:migrate db:test:prepare db:seed_fu

```

---

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [8월 18, 2016, 7:41오후 UTC](https://meta.discourse.org/t/getting-error-when-trying-to-perform-migrations-on-mac-os-x-for-development/48825/8 "2016-08-18T19:41:45Z")

</div>

many thanks @techAPJ 😉
