Discourse change root email error
Solved
Discourse
-
SyntaxError ((irb):2: syntax error, unexpected ':', expecting `end') irb(main):001:0> u = User.find_by_usern... ^
The Cloudron instructions to change root's email are here;
-
@LoudLemur works like expected. Please do not copy the whole line and not everything all at once.
root@24b1add9-15ef-4255-9c41-818b8ab7b3dc:/app/code# sudo -E -u root bundle exec script/rails console fatal: not a git repository (or any of the parent directories): .git Loading production environment (Rails 6.1.6.1) irb(main):001:0> u = User.find_by_username("root") => #<User id: 1, username: "root", created_at: "2022-08-30 21:45:35.005212000 +0000", updated_at: "2022... irb(main):002:0> u.email = "admin@test.pro" => "admin@test.pro" irb(main):003:0> u.email_tokens.create(email: u.email) => #<EmailToken id: 6, user_id: 1, email: "admin@test.pro", confirmed: false, expired: false, created_at: "2022-08-30 21:48:23.999384866 +0000", updated_at: "2022-08-30 21:48:23.999384866 +0000", token_hash: "16536bc4c1bc61d44853bcdc8bb5dbe18833341fe1612d74bd...", scope: nil> irb(main):004:0> u.save! => true irb(main):005:0>
First you enter the console and afterwards you paste the commands line by line starting with
u = User.find_by_username("root")
... -
-
-
-
-