I'm trying to create a new user form my rails application. I already ran
psql -p 5432 -h localhsot -U postgres and created a new user. Then I added the user with
sudo adduser user_name and afterwards changed to the user with
sudo su user_name.
This works, but when I try to create a new app with
rails new app -d postgresql, I'm getting the error “command rails not found”.
When I try to install the rails command with
apt install ruby-railties, I'm getting the following error.
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?