Your problem is that Something
is an abstract class:
class Something < ApplicationRecord
self.abstract_class = true # <-------------------------
Abstract classes aren't mean to be instantiated directly, you're supposed to subclass them and instantiate the subclasses. The abstract_class
property is, more or less, a way to subclass models without invoking STI (Single Table Inheritance).
Either use Something
as a base class for models in the second database or remove the self.abstract_class = true
to make it a "real" model class.
As far as where your no implicit conversion of nil into String
error comes from, keep in mind that abstract model classes don't have table names and cannot be instantiated, from the documentation:
class Shape < ActiveRecord::Base
self.abstract_class = true
end
Polygon = Class.new(Shape)
Square = Class.new(Polygon)
Shape.table_name # => nil
Polygon.table_name # => "polygons"
Square.table_name # => "polygons"
Shape.create! # => NotImplementedError: Shape is an abstract class and cannot be instantiated.