"invalid e-mail" in migration to 0.6.1


#1

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


#2

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), 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


#3

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 :slight_smile:

Thanks again,
Andy


#4

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, I go to 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