# Changing users email address

**URL:** <https://meta.discourse.org/t/changing-users-email-address/72119>\
**Category:** Product Support\
**Created:** [15 באוקטובר,‏ 2017,‏ 10:58pm UTC](https://meta.discourse.org/t/changing-users-email-address/72119 "2017-10-15T22:58:21Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![gigperformer](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@gigperformer](https://meta.discourse.org/u/gigperformer)\
**Post date:** [16 בנובמבר,‏ 2018,‏ 12:03am UTC](https://meta.discourse.org/t/changing-users-email-address/72119/11 "2018-11-16T00:03:57Z")

</div>

I just tried this (assuming that the cd /var/discourse is a line by itself and that sudo … is a separate line) and I just got the error:

-bash: syntax error near unexpected token ‘(’

Then I tried

```
cd /var/discourse 
sudo ./launcher enter app rails c UserEmail.find_by(email: "oid@example.com").update(email: "new@example.com")

```

which didn’t work and then I tried

```
cd /var/discourse 
sudo ./launcher enter app rails c 
UserEmail.find_by(email: "oid@example.com").update(email: "new@example.com")

```

(using the appropriate email addresses of course) and got the error

```
bash: syntax error near unexpected token `email:'

```

So how **exactly** should this be entered?

---

_[View the full topic](https://meta.discourse.org/t/changing-users-email-address/72119)._
