Problems with Typo

H

Hal Fulton

Hi, all...

For the second night, I'm playing with Typo. It seems pretty cool,
but I'm having trouble configuring it.

Basically I create all three databases (I'm using MySQL).

But then when I start the server (and go to /admin in the browser),
it behaves differently for each database!

-e production

Runs, but asks me for a login. Don't know how to login or
create an account.

-e test

Says '/' isn't found.

-e development

Seems to work -- prompts me to create a user, then goes on to
ask for name of blog, etc.


So what is going on here??


Thanks,
Hal
 
D

Dick Davies

* Hal Fulton said:
Hi, all...

For the second night, I'm playing with Typo. It seems pretty cool,
but I'm having trouble configuring it.

Basically I create all three databases (I'm using MySQL).

But then when I start the server (and go to /admin in the browser),
it behaves differently for each database!

-e production

Runs, but asks me for a login. Don't know how to login or
create an account.

It only asks you to signup if a User doesn't exist yet:


eris% grep -C 2 verify_user_exists app/controllers/articles_controller.rb
cache_sweeper :blog_sweeper, :eek:nly => "comment"

before_filter :verify_user_exists
before_filter :verify_config

private

def verify_user_exists
redirect_to :controller => "accounts", :action => "signup" if User.find_all.length == 0
end
eris%

So presumably your live db has a user record in it already.
-e test

Says '/' isn't found.

Wouldn't expect that to work sensibly - the test db is for the testsuite, I'm not sure it's going to do
sane things if you actually try to use it.
 
H

Hal Fulton

Dick said:
It only asks you to signup if a User doesn't exist yet:

That makes sense.
So presumably your live db has a user record in it already.

I just created the database and then installed Typo. So I
assumed there would be no users.

However, I see now you're correct: There are five users there,
such as bob, longbob, and existingbob. :) Maybe I contaminated
the db somehow...

I'll trucate that and try again.
Wouldn't expect that to work sensibly - the test db is for the testsuite, I'm not sure it's going to do
sane things if you actually try to use it.

OK... I assumed that since it was for test purposes, it would also
work for a (manual) test of the interface...


Thanks,
Hal
 
D

Dick Davies

* Hal Fulton said:
Dick Davies wrote:
However, I see now you're correct: There are five users there,
such as bob, longbob, and existingbob. :) Maybe I contaminated
the db somehow...

They're users from the testsuite (see test/fixtures/users.yml),
so maybe you got the db mixed up with the live one or something?
OK... I assumed that since it was for test purposes, it would also
work for a (manual) test of the interface...

It'd be nice if it did, but I wouldn't count on it :)
Running development with breakpoints enabled is fantastic if you need to debug
bits and pieces of your app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top