title: How to fix a "value too long for type character varying(255)" error
body: <p>I'm trying to save a file so that I can upload it to stripe using CarrierWave, but I'm getting the error:</p>
  
  <pre><code>ERROR: value too long for type character varying(255)
  </code></pre>
  
  <p>and don't understand why as I followed the CarrierWave usage guide on GitHub.</p>
  
  <p>This is my application:</p>
  
  <pre><code>class SplitterStripeServer &lt; 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.save!
      redirect to("/")
    end
  
    get "/upload" do
      erb :upload
    end
  
    get "/" do
      @image = Image.find(1)
      erb :index
    end
  end
  </code></pre>
  
  <p>This is the uploader:</p>
  
  <pre><code>class ImagesUploader &lt; CarrierWave::Uploader::Base
    include CarrierWave::MiniMagick
    storage :file
  end
  </code></pre>
  
  <p>This is the model:</p>
  
  <pre><code>class Image
    include DataMapper::Resource
  
    property :id, Serial
  
    mount_uploader :file, ImagesUploader
  end
  </code></pre>
  
  <p>I feel like I'm missing something simple.</p>