Problems with Typo

Discussion in 'Ruby' started by Hal Fulton, Jun 24, 2005.

  1. Hal Fulton

    Hal Fulton Guest

    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
    Hal Fulton, Jun 24, 2005
    #1
    1. Advertising

  2. Hal Fulton

    Dick Davies Guest

    * 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, :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.


    --
    '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
    Dick Davies, Jun 24, 2005
    #2
    1. Advertising

  3. Hal Fulton

    Hal Fulton Guest

    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
    Hal Fulton, Jun 25, 2005
    #3
  4. Hal Fulton

    Dick Davies Guest

    * 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
    Dick Davies, Jun 25, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard Fagen
    Replies:
    0
    Views:
    406
    Richard Fagen
    Aug 28, 2003
  2. Theodore H. Smith

    url typo

    Theodore H. Smith, Jul 29, 2003, in forum: XML
    Replies:
    0
    Views:
    508
    Theodore H. Smith
    Jul 29, 2003
  3. Lorenzo Villari

    K&r typo

    Lorenzo Villari, Feb 9, 2004, in forum: C Programming
    Replies:
    5
    Views:
    553
    Peter Pichler
    Feb 15, 2004
  4. Vijay Kumar R Zanvar

    Typo in n869

    Vijay Kumar R Zanvar, Jun 10, 2004, in forum: C Programming
    Replies:
    1
    Views:
    313
    those who know me have no need of my name
    Jun 10, 2004
  5. Gregor
    Replies:
    0
    Views:
    268
    Gregor
    Oct 17, 2003
Loading...

Share This Page