# "invalid e-mail" in migration to 0.6.1

**URL:** <https://www.ruby-forum.com/t/invalid-e-mail-in-migration-to-0-6-1/106728>\
**Category:** Radiant CMS\
**Created:** [June 13, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/invalid-e-mail-in-migration-to-0-6-1/106728 "2007-06-13T17:11:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_Buckley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Andy\_Buckley](https://www.ruby-forum.com/u/Andy_Buckley)\
**Post date:** [June 13, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/invalid-e-mail-in-migration-to-0-6-1/106728/1 "2007-06-13T17:11:31Z")

</div>

I upgraded my 0.5 Radiant site to 0.6.1 several weeks ago, but it’s  
never been quite right and I can’t seem to get extensions to work. I  
think the root cause is something about the db migration being unable to  
finish because of an invalid email address:

# andy@dirac:/www/insectnation$ rake db:migrate (in /www/insectnation) Extensions cannot be used until Radiant migrations are up to date. == InsertInitialData: migrating

Creating the user ‘admin’ with the password ‘radiant’…  
rake aborted!  
Validation failed: Email invalid e-mail address

# (See full trace by running task with --trace) andy@dirac:/www/insectnation$ rake migrate (in /www/insectnation) Extensions cannot be used until Radiant migrations are up to date. == InsertInitialData: migrating

Creating the user ‘admin’ with the password ‘radiant’…  
rake aborted!  
Validation failed: Email invalid e-mail address

(See full trace by running task with --trace)

I can’t fin any invalid email addresses through the web interface - any  
suggestions as to what I should do to sort this out?

Thanks,  
Andy

---

<div class="post-metadata">

**Author:** ![Andy\_Buckley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Andy\_Buckley](https://www.ruby-forum.com/u/Andy_Buckley)\
**Post date:** [June 13, 2007, 7:14pm UTC](https://www.ruby-forum.com/t/invalid-e-mail-in-migration-to-0-6-1/106728/2 "2007-06-13T19:14:52Z")

</div>

Andy Buckley wrote:

> …
> 
> I can’t fin any invalid email addresses through the web interface - any  
> suggestions as to what I should do to sort this out?

That’s very strange. If you followed the upgrade instructions  
([http://dev.radiantcms.org/radiant/wiki/HowToUpgrade05xTo06](http://dev.radiantcms.org/radiant/wiki/HowToUpgrade05xTo06)), I’ve no  
idea why you would be getting that error.

It looks like you are running the migrate command on the development  
database. Is that what you really want to do? To migrate your production  
database you will need to run:

$ rake production db:migrate

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![Andy\_Buckley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Andy\_Buckley](https://www.ruby-forum.com/u/Andy_Buckley)\
**Post date:** [June 13, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/invalid-e-mail-in-migration-to-0-6-1/106728/3 "2007-06-13T20:56:15Z")

</div>

John W. Long wrote:

> Andy Buckley wrote:

> It looks like you are running the migrate command on the development  
> database. Is that what you really want to do? To migrate your production  
> database you will need to run:
> 
> $ rake production db:migrate

Ah, that’s exactly the problem: I wasn’t specifying “production” with  
the other rake commands that I was running to install extensions.  
Thanks.

Okay, dumb question time. As the above shows, I’m not quite sure about  
the role that development and production databases play in Radiant. Is  
that just a generic Rails thing that doesn’t really apply to _running_ a  
Radiant site?  
Being pretty much a newcomer to Rails apps, is there any decent guide to  
how I can use the development and production modes? At the moment I’m  
just using the production mode which means I can’t preview pages - in  
particular, is there a way that I can add pages in draft mode and view  
them on a development server (i.e. just webrick/mongrel on a different  
port) before publishing them on the live site? I think I saw something  
on the Radiant user guide to that effect but without a specific example.  
Sorry if that’s a very dumb question: it sounds like the sort of thing  
that _should_ be obvious 🙂

Thanks again,  
Andy

---

<div class="post-metadata">

**Author:** ![Andy\_Buckley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Andy\_Buckley](https://www.ruby-forum.com/u/Andy_Buckley)\
**Post date:** [June 13, 2007, 9:21pm UTC](https://www.ruby-forum.com/t/invalid-e-mail-in-migration-to-0-6-1/106728/4 "2007-06-13T21:21:19Z")

</div>

> Ah, that’s exactly the problem: I wasn’t specifying “production” with  
> the other rake commands that I was running to install extensions. Thanks.
> 
> Okay, dumb question time. As the above shows, I’m not quite sure about  
> the role that development and production databases play in Radiant. Is  
> that just a generic Rails thing that doesn’t really apply to _running_ a  
> Radiant site?

That’s a Rails thing. Development mode only really applies when you’re  
working on the Radiant codebase or an extension and you need to debug  
things.

> 

Previewing pages is more a function of the hostname than the  
runtime-environment. For example, when I want to preview pages on  
[seancribbs.com](http://seancribbs.com), I go to [dev.seancribbs.com](http://dev.seancribbs.com). This is a baked-in default  
of Radiant. Of course, you’ll have to make sure your DNS is set up  
correctly.

Sean
