【问题标题】:Typus not working in Heroku (error 500) what I'm doing wrong?Typus 无法在 Heroku 中工作(错误 500)我做错了什么?
【发布时间】:2010-03-30 01:18:09
【问题描述】:

有人在Heroku 中使用过Typus(rails 的管理插件)吗?

http://intraducibles.com/projects/typus/install

我按照说明操作,在我的本地机器 (Rails 2.3.5) 上工作正常,但是当我部署到 Heroku 时它崩溃了。

我做错了什么?

日志:

 Logfile created on Mon Mar 29 18:14:06 -0700 2010

Processing TypusController#dashboard (for 190.196.113.93 at 2010-03-29 18:14:07) [GET]
  Parameters: {"action"=>"dashboard", "controller"=>"typus"}

ActiveRecord::StatementInvalid (PGError: ERROR:  relation "typus_users" does not exist
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"typus_users"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum
):
  vendor/plugins/typus/app/controllers/typus_controller.rb:128:in `verify_typus_users_table_schema'
  /home/heroku_rack/lib/static_assets.rb:9:in `call'
  /home/heroku_rack/lib/last_access.rb:25:in `call'
  /home/heroku_rack/lib/date_header.rb:14:in `call'
  thin (1.0.1) lib/thin/connection.rb:80:in `pre_process'
  thin (1.0.1) lib/thin/connection.rb:78:in `catch'
  thin (1.0.1) lib/thin/connection.rb:78:in `pre_process'
  thin (1.0.1) lib/thin/connection.rb:57:in `process'
  thin (1.0.1) lib/thin/connection.rb:42:in `receive_data'
  eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine'
  eventmachine (0.12.6) lib/eventmachine.rb:240:in `run'
  thin (1.0.1) lib/thin/backends/base.rb:57:in `start'
  thin (1.0.1) lib/thin/server.rb:150:in `start'
  thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start'
  thin (1.0.1) lib/thin/runner.rb:173:in `send'
  thin (1.0.1) lib/thin/runner.rb:173:in `run_command'
  thin (1.0.1) lib/thin/runner.rb:139:in `run!'
  thin (1.0.1) bin/thin:6
  /usr/local/bin/thin:20:in `load'
  /usr/local/bin/thin:20

Rendering /disk1/home/slugs/157361_3469154_60b1/mnt/public/500.html (500 Internal Server Error)

【问题讨论】:

    标签: ruby-on-rails heroku


    【解决方案1】:

    看起来 typus 用户表不存在。

    你迁移到 heroku (heroku rake db:migrate) 了吗?或者使用 db:push 来推动你的模式?

    编辑:添加用于迁移的 heroku 命令

    【讨论】:

    • 是的,它成功了!非常感谢(我要等几分钟才能接受你的回答)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-07
    • 2012-04-15
    • 2021-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多