私はPaperclipからCarrierWaveに切り替えています。私のアップローダにCarrierWave :: MiniMagickを含めると、次のエラーが発生します。アップローダのCarrierWave :: MiniMagickを含めても、私のAPP_PATH定数が初期化されるのはなぜですか?
=> Booting WEBrick
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
Exiting
bin/rails:6: warning: already initialized constant APP_PATH
/Users/me/code/project/bin/rails:6: warning: previous definition of APP_PATH was here
Usage: rails COMMAND [ARGS]
これは私のアップローダークラスです:
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :file
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
version :thumb do
process resize_and_pad: [280, 200, :transparent, "Center"]
end
version :medium do
process resize_and_pad: [625, 730, :transparent, "Center"]
end
end
には、削除して、私のアプリは、通常のように起動します。同様に、私はCarrierWaveが別のアプリを実行しようとしていると思うかもしれませんが、私はそれを許可するために自分のレールファイルをどのように設定すればいいのか分かりません。助けて?
https://github.com/rails/rails/issues/14115 –
のディスカッションに記載されている可能性のある修正がありますが、ありません。その問題は春に関係しています。私の瞬間は終了します。 – sabaeus