You can do this on your local console. Just run it:
rails console
Then you need the connection information for your heroku subscribers database. You can get this from https://postgres.heroku.com/databases/ . Just click on the appropriate database and assign a hash with the following information:
follower_db = {:adapter => "postgresql", :host => "myhost", :username => "myuser", :password => "mypass", :database => "somedatabase"}
Now connect to this remote database from the console:
ActiveRecord::Base.establish_connection(follower_db)
Now any request that you enter in the console will be launched in this database.
source share