Re: test TurboGears download?

1 view
Skip to first unread message

Kevin Dangoor

unread,
Sep 16, 2005, 9:59:52 PM9/16/05
to John Miller, turbo...@groups.google.com
Hi John,

Yes, moving this off of the michipug list is a good idea. I've cc'ed
the turbogears mailing list (which currently has one subscriber: me
:). I figure it's good to get something in there for archival
purposes.

On 9/16/05, John Miller <john.mi...@gmail.com> wrote:
> Anyway, I'm having trouble connecting to a database, following the
> tutorial instructions. Here's what I get:
>
> gis:~ ics$ turbogears-admin.py sql create
> Database URI not specified in the config file (prod.cfg).
> Please be sure it's on the command line.
> gis:~ ics$

You need to run that command in the generated project directory.
turbogears-admin uses what it knows about quickstart project layout to
make life easier on you. It's possible that the tutorial wasn't clear
on the fact that you need to be in that directory. It's *certain* that
the errors message you've got there is a bad one, because the prod.cfg
file wouldn't even have been in the directory you were in.

>
> I get this for both MySQL and SQLite, configured in both prod.cfg and
> dev.cfg.
>
> The relevant config lines look like this:
>
> sqlobject.dburi="mysql://turbo:gears@localhost:3306/turbowiki"
> sqlobject.dburi="sqlite:///Users/ics/turbowiki/wikidata.db"
>
> (Also, dev.cfg has the additional line
>
> autoreload.package="turbowiki"
>
> at the top; prod.cfg doesn't.)

Yep, that all sounds right.

>
> Both 'mysql' and 'sqlite' work on the command line. So, I'm not sure
> how to troubleshoot this. Any ideas?

I haven't yet announced TurboGears to the world. I'm 90% certain it
will be up in the cheeseshop tomorrow, and will most likely get a
public announcement as well. One of the things I'm going to do is
update the documentation page with the additional docs I plan to write
and when I plan to have them there. Things like configuration and
turbogears-admin *need* some docs, because those docs would have made
this problem very easy for you to tackle.

>
> Also, in the tutorial at
> http://www.turbogears.org/docs/wiki20/index.html I find the first class
> definition like so:
>
> class Page:
> pagename=StringCol(alternateID=True)
> data=StringCol()
> modified=DateTimeCol()
>
> However, it seems as though it ought to be:
>
> class Page(SQLObject):
> _connection = hub
> pagename=StringCol(alternateID=True)
> data=StringCol()
> modified=DateTimeCol()

That and the "modified" line shouldn't be there, because none of the
rest of the tutorial uses it. (In fact, the code to create a new page
would fail if it's there!)

I'm glad you caught that! You're the first person other than me to
actual run through the tutorial, and I really appreciate the cleanup
help you're providing.

Hopefully, with this message you'll be able to get all the way through
the tutorial.

Kevin

Kevin Dangoor

unread,
Sep 17, 2005, 9:41:43 AM9/17/05
to skrys...@gmail.com, turbo...@groups.google.com
Hi Steve,

You're certainly right about Windows not being my primary platform.
(Though I do use Windows for making and testing Windows builds of
Zesty News, of course!)

Part of the reason my Windows docs were overly sparse is that even on
Windows, I use cygwin... so my command line experience is almost
always unixy.

On 9/17/05, Steven Kryskalla <skrys...@gmail.com> wrote:
> 1.) Commands that call that python executable (python.exe) will not
> work because C:\python24\ is not on the path by default. Just using
> the script name is enough.
>
> 2.) C:\python24\scripts is not on the path by default either, which
> means you can't run turbogears-admin.py without first adding something
> to your path. I suggest putting an instruction for Windows users to
> add C:\python24\scripts\ and C:\python24\ to their path, so they can
> run both turbogears-admin.py and python.exe. I'm not sure what the
> script-dir option on easy-install.py does, but Windows users don't
> really have an equivalent of /usr/local/bin/.
> You can set the path on Windows (only for the current command prompt)
> using:
> path %path%;c:\python24;c:\python24\scripts;
> Or, to set it permanently:
> go to System Properties -> Advanced -> Environment Variables, then
> double click Path and add ;c:\python24;c:\python24\scripts;

I've gathered there's also a command (setx) that lets you do this from
the command line. But, I think I'll stick with your instructions.
These instructions will eliminate the need for --script-dir.

> 3.) I also thought it was a good idea to put the "where to next", but
> it is missing from the 'Python 2.4 with Easy Install' section.

Good catch.

> 4.) It might be good to divide the page up into seperate pages,
> especially because the Windows information is probably not useful to
> people installing on Mac/Linux, and the Mac/Linux information (sudo,
> /usr/local/bin) is not useful to Windows people. I'd be willing to
> help you with anything you need for the Windows install page
> (screenshots, etc.)

You're right about this. That page is getting a bit nasty. I'll redo
this into multiple pages. Once I've done that, if you see good spots
for screenshots, I'd happily accept them.

> I will now work my way through the Wiki 20 tutorial!

Groovy! John Miller found a bug in there which is already corrected on
the site, so hopefully you'll have a smooth time of it.

Kevin
Reply all
Reply to author
Forward
0 new messages