github.com github.com ファイルをアップロードするのではなく、例えばサーバ側で rubyXL を用いて新規ファイルを作ってそれを carrierwave の仕組み上で管理したい。 carrierwave 用に mount_uploader した変数に ActionDispatch::Http::UploadedFile を渡せば良いのだろうけど、やり方がわからない。 ActionDispatch::Http::UploadedFile rubyXL で新規にデータを作った場合はまだファイルになっていない。 StringIOの状態。 そこで、ささたつさんのサイトに答えが。よくこんなのわかるなぁ。すごい。 blog.livedoor.jp tempfile を作って、ActionDispatch::Http::UploadedFile インスタンスを渡せばよい。 tempf