railsでファイルアップロードを行うcarrierwave(Github)は非常に便利です。 しかし、railsを動作させる環境によってはファイルアップロードができなかったりします。 そういう場合、別の(レンタル)サーバーにftpでファイルを転送させたくなります。 (AWSとか難しいしお金かけたくないもんね!) これを実現してくれるcarrierwave-ftp(Github)という��gemを今回は紹介します。 まずはインストール 使い方はGithubに乗っている通りで非常に簡単です。 Gemfileに下記を追加してbundle installを行いましょう。 /#*ruby gem 'carrierwave-ftp', :require => 'carrierwave/storage/ftp/all' 設定ファイルにftpサーバーの情報を書く 設定ファイルは config/appli