module HumanPower
  module Rails
    class RobotsController < ::ApplicationController
      def robots
        generator = HumanPower::Generator.new(self) do
          file = ::Rails.root.join("config", "robots.rb").to_s
          instance_eval open(file).read, file
        end

        # render text: something does not give correct content type
        render text: generator.render, content_type: 'text/plain'
      end
    end
  end
end

module HumanPower
  module Rails
    class RobotsController < ::ApplicationController
      def robots
        generator = HumanPower::Generator.new(self) do
          file = ::Rails.root.join("config", "robots.rb").to_s
          instance_eval open(file).read, file
        end

        # render text: something does not give correct content type
        render text: generator.render, content_type: Mime::TEXT
      end
    end
  end
end

Use Mime::TEXT for content type
Use Mime::TEXT for content type
