[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problems with Typo

Hal E. Fulton

6/24/2005 1:17:00 AM

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



3 Answers

Dick Davies

6/24/2005 10:09:00 AM

0

* Hal Fulton <hal9000@hypermetrics.com> [0617 02:17]:
> 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, :only => "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.


--
'Avoid parking tickets by leaving your windscreen wipers turned to 'fast wipe' whenever you leave your car parked illegally.'
-- Top Tips
Rasputin :: Jack of All Trades - Master of Nuns


Hal E. Fulton

6/24/2005 11:16:00 PM

0

Dick Davies wrote:
>
> 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.

>> -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.
>

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


Thanks,
Hal





Dick Davies

6/25/2005 8:59:00 AM

0

* Hal Fulton <hal9000@hypermetrics.com> [0616 00:16]:
> Dick Davies wrote:

> >So presumably your live db has a user record in it already.

> 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.

--
'The State is the kind of organization which, though it does big things
badly, does small things badly too.'
-- John Kenneth Galbraith
Rasputin :: Jack of All Trades - Master of Nuns