zoukankan      html  css  js  c++  java
  • flask and postgre on heroku

    http://blog.y3xz.com/blog/2012/08/16/flask-and-postgresql-on-heroku/

    给出链接,还没来得及整理。

    1.heroku addons:add heroku-postgresql:dev可能出现如下错误:

    /Users/bracken/.rvm/gems/ruby-1.9.3-p194/gems/heroku-2.32.11/lib/heroku/helpers.rb:103: warning: Insecure world writable dir /Users/bracken/product/python_study/flaskProject/flask-sqlchemy-test in PATH, mode 040777
    Adding heroku-postgresql:dev on agile-savannah-6541... done, v14 (free)
    Attached as HEROKU_POSTGRESQL_ORANGE_URL
    Database has been created and is available
     ! This database is empty. If upgrading, you can transfer
     ! data from another database with pgbackups:restore.
    Use `heroku addons:docs heroku-postgresql:dev` to view documentation.

    解决方法:只需要拷贝 HEROKU_POSTGRESQL_ORANGE_URL。替换heroku pg:promote HEROKU_POSTGRESQL_COLOR即可。

     2.如果是从github上面clone出的非master分支,heroku addons:add heroku-postgresql:dev可能出现如下错误:

    (env)➜  flaskBlogDemo git:(master) ✗ heroku addons:add heroku-postgresql:dev
    /Users/bracken/.rvm/gems/ruby-1.9.3-p194/gems/heroku-2.32.11/lib/heroku/helpers.rb:103: warning: Insecure world writable dir /Users/bracken/product/python_study/flaskProject/flask-sqlchemy-test in PATH, mode 040777
     !    No app specified.
     !    Run this command from an app folder or specify which app to use with --app APP.

    解决方法:需要添加heroku的路径

    git remote add heroku git@heroku.com:agile-savannah-6541.git
  • 相关阅读:
    Batch
    Batch
    《mysql必知必会》学习_第17章
    指针实现时间复杂度为O(n*logN)的排序算法(归并排序算法)
    《自控力》读书笔记
    Leetcode 49. Group Anagrams (242.Valid Anagram)
    Leetcode43. Multiply Strings
    Leetcode 233. Number of Digit One
    Python 格式化输出占位符替换
    Python字符串拼接
  • 原文地址:https://www.cnblogs.com/bracken/p/2911081.html
Copyright © 2011-2022 走看看