prisskreative
4/14/2015 - 2:56 PM

Restart computer db - brew postgres - mysql

Restart computer db - brew postgres - mysql

yosemite fix 
[1] pry(main)>File.expand_path ("./") 
No find database
------

raise ActiveRecord::NoDatabaseError.new(error.message, error)

------

Did you run rake db:create and rake db:migrate before rails server?

UPDATE

Here's all the steps you should do:

cd /your/app/path
bundle install
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rails server
Postgres could not connect to server

rm /usr/local/var/postgres/postmaster.pid
brew info postgres

Or, if you don't want/need launchctl, you can just run:
    postgres -D /usr/local/var/postgres
    
    
------

brew info postgresql

-------

Success. You can now start the database server using:

    postgres -D /usr/local/var/postgres
or
    pg_ctl -D /usr/local/var/postgres -l logfile start
    
  
  
-------

status

pg_ctl -D /usr/local/var/postgres status


stop server

brew services list
brew services restart postgresql
We've installed your MySQL database without a root password. To secure it run:
    mysql_secure_installation

To connect run:
    mysql -uroot

To have launchd start mysql now and restart at login:
  brew services start mysql
Or, if you don't want/need a background service you can just run:
  mysql.server start