Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problems with Typo

Reply
Thread Tools

Problems with Typo

 
 
Hal Fulton
Guest
Posts: n/a
 
      06-24-2005
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



 
Reply With Quote
 
 
 
 
Dick Davies
Guest
Posts: n/a
 
      06-24-2005
* Hal Fulton <> [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, 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.


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


 
Reply With Quote
 
 
 
 
Hal Fulton
Guest
Posts: n/a
 
      06-24-2005
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





 
Reply With Quote
 
Dick Davies
Guest
Posts: n/a
 
      06-25-2005
* Hal Fulton <> [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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Typo in advertising mark_digital Digital Photography 5 08-21-2004 03:33 PM
Typo in Canon lens specs? Chris Carlen Digital Photography 3 09-19-2003 09:40 AM
Web Matrix - typo error screwed me up for a bit Richard Fagen ASP .Net 0 08-28-2003 04:27 PM
Re: The Typo Jimchip Computer Support 1 08-13-2003 09:29 PM
url typo Theodore H. Smith XML 0 07-29-2003 06:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57