How to fix a “value too long for type character varying(255)” error
问题 I'm trying to save a file so that I can upload it to stripe using CarrierWave, but I'm getting the error: ERROR: value too long for type character varying(255) and don't understand why as I followed the CarrierWave usage guide on GitHub. This is my application: class SplitterStripeServer < Sinatra::Base CarrierWave.configure do |config| config.root = File.dirname(__FILE__) + "/public" end post "/" do img = Image.new img.file = params[:file] #carrierwave will upload the file automatically img