Discourse change root email error
-
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;
-
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")... -
L LoudLemur marked this topic as a regular topic on
-
@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")... -
N nebulon marked this topic as a question on
-
N nebulon has marked this topic as solved on
-
G girish has marked this topic as unsolved on
-
G girish has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login