Heroku部署数据未显示

时间:2017-01-08 09:24:15

标签: ruby-on-rails heroku

您好我正在制作一个有两个型号Category和Doctor的应用程序..目的是列出所有医生..该应用程序在本地服务器上运行完美。但是当我将它部署到Heroku时,数据没有显示出来。他们的任何一个人能帮忙吗?

1 个答案:

答案 0 :(得分:2)

您可以通过运行#include <iostream> template <typename T, std::size_t N> constexpr std::size_t arraySize(T (&) [N]) noexcept { return N; } template <typename T> struct namesB { static constexpr char const * names[] = {"foo", "bar"}; }; template <> struct namesB<bool> { static constexpr char const * names[] = {"foo", "bar", "foobar"}; }; template <typename T> class A : public namesB<T> { /* a complex class defined only one time */ }; template<typename T> constexpr char const * namesB<T>::names[]; constexpr char const * namesB<bool>::names[]; int main() { std::cout << arraySize(A<long>::names) << std::endl; // print 2 std::cout << arraySize(A<bool>::names) << std::endl; // print 3 }

来通过控制台检查表格中的数据

然后,您可以heroku run rails cCategory.count

检查是否有数据

如果没有数据且您在Doctor.count中有数据,只需按seed.rb

运行您的种子