pip install is not finding postgresql2 for me:
"Could not find any downloads that satisfy the requirement postgresql2
No distributions at all found for postgresql2"
I tried installing psycopg2 instead, but no love from that:
"<type 'exceptions.RuntimeError'> Failure to connect, tried 5 times:
Traceback (most recent call last): File "/app/gluon/dal.py", line 6825, in
__init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File
"/app/gluon/dal.py", line 2094, in __init__ if do_connect:
self.find_driver(adapter_args) File "/app/gluon/dal.py", line 709, in
find_driver raise RuntimeError("no driver available %s" % self.drivers)
TypeError: not all arguments converted during string formatting
"
On Thursday, November 29, 2012 7:41:45 AM UTC-8, Massimo Di Pierro wrote:
>
> FYI (from web2py-developers)
>
>
> Hello everybody,
>
> At PyCon Argentina I met Craig Kerstiens from Heroku. He explained to me
> how heroku works and we were able to make web2py work on heroku.
>
> This is still experimental and I will continue tweak it but you may want
> to give it a try and share your suggestions for improvement:
>
>
> HOWTO:
>
> 1) get a heroku account and SDK (it is all free)
>
> 2) download web2py from google code (not from github because you do not
> want the .git folder)
>
> hg clone https://[email protected]/p/web2py/
>
> cd web2py
>
> 3) install your web2py apps
>
> 4) in each app, replace
>
> db=DAL(…)
>
> with
>
> from gluon.contrib.heroku import get_db
>
>
> db = get_db()
>
> 5) from inside the web2py folder do (this create a git repo, if you have
> one, delete it):
>
> scripts/setup-web2py-heroku.sh
>
> Now should have your apps running on heroku with postgresql.
>
> caveats:
>
> get_db() gives you a postgresql connection on heroku and stores sessions,
> migrations , and uploads in postgres (one db for all apps). When running
> locally uses a heroku.test.sqlite database (one for each app). I will post
> instructions so that each app gets its own database. Tickets still go in
> file system and will be accessible via admin interface but every 24hrs the
> file system is wiped out and tickets are lost.
>
> Admin is not in readonly mode but any change you do via admin will be lost
> when the system is reset (every 24 hrs). So you should assume it is
> readonly.
>
> Appadmin works fine.
>
> Is the DAL(…) -> get_db() replacement too much to ask to the users? We
> could do it automatically under the hood once we detect heroku. What do you
> think? Using get_db gives more flexibility for tweaking, specifically when
> multiple databases are present.
>
> There are two files that need to be created (done by
> setup-web2py-heroku.sh): requirements.txt and Procfile. We could ship them
> with web2py but people need to be able to configure them anyway. Should we
> ship them or let users create them?
>
> This should be even easier. People should be able to simply git commit
> apps (with get_db) and pip install web2py. I do not know how to do it
> because I do not understand distutil and git well enough yet. Perhaps
> people should be able to git pull apps directly from the admin running on
> heroku.
>
>
> Massimo
>
--