-
First of all install and configure PostgreSQL on your machine.
-
In Terminal:
bundle install;
sudo -u postgres psql
CREATE USER login_name_you_like PASSWORD 'any_password_you_like‘;
ALTER USER login_name_you_like CREATEDB;
\q
- Add changes to config/database.yml (under 'timeout' property):
host: localhost
username: login_name_that_you_created
password: password_that_you_created
- In Terminal:
bundle exec rails db:create
bundle exec rails db:migrate
- In Terminal:
rails c
admin_user = User.new(:email => "admin@mail.com", :password => 'testtest', :password_confirmation => 'testtest', :admin => true)
admin_user.save
exit
rake routes;
rails server
admin@mail.com
testtest
Enjoy! :)