$ cd ~/.rbenv
$ git pull
$ cd ~/.rbenv/plugins/ruby-build
$ git pull
[ ...new Set([1, 2, 3, 1, 2, 3]) ] // [1, 2, 3]
rake db:migrate:redo VERSION=20100421175455
https://stackoverflow.com/questions/4820549/how-to-empty-db-in-heroku
heroku pg:reset DATABASE_URL
heroku run rake db:migrate
heroku run rake db:seed
run shell - sudo -u [as user. default - postgres] psql postgres
create user for rails app - CREATE ROLE [name] WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD 'password';
list all users - \du
set password - \password
list all databases - \l
Problem occurs when changing column of type string
to integer
.
Solution:
def change
change_column :favourites, :user_id, 'integer USING CAST(user_id AS integer)'
end
lsof -i tcp:3000 | |
kill -9 [PID] |