Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 使用Postgresql扩展模型ActiveRecord_Ruby On Rails_Postgresql - Fatal编程技术网

Ruby on rails 使用Postgresql扩展模型ActiveRecord

Ruby on rails 使用Postgresql扩展模型ActiveRecord,ruby-on-rails,postgresql,Ruby On Rails,Postgresql,我正在尝试将ActiveRecord扩展到此类。我正在使用Postgresql class Jobo::Provider < ActiveRecord::Base self.abstract_class = true end class Jobo::Stripe < Provider # code end classjobo::Provider

我正在尝试将ActiveRecord扩展到此类。我正在使用Postgresql

class Jobo::Provider < ActiveRecord::Base
  self.abstract_class = true
end
class Jobo::Stripe < Provider
# code
end
classjobo::Provider
当我试图添加

self.abstract_class=true

我犯了这个错误

2.2.2:001>Jobo::Provider.first TypeError:没有将nil隐式转换为字符串 /Users/Michelin/.rvm/gems/ruby-2.2.2/gems/activerecord-4.2.0/lib/active\u record/connection\u adapters/postgresql/utils.rb:24:in'quote\u ident'from/Users/Michelin/.rvm/


我的错误在哪里?

制作一个抽象类意味着你不能直接使用它,这就是抽象的意思。

制作一个抽象类意味着你不能直接使用它,这就是抽象的意思