I'm asking this question because it seems pretty hard to setup, between Image Magick and all the mecanics there is to put to work... I saw there was another solution Carrierwave but which seems as I read harder to install.
So in the end I tend to think it could be better to choose something simpler like Gravatar, except that the app I'm working on consists on people exposing portfolios with photos among other things... So anyways I will have to get a gem that permit uploading files on the user profiles...
Which solution do you suggest me the best, eventually the easiest possible but most of all, a working one.
Thank you in advance for your time and hoping you're having a good day
I would recommend Rails's ActiveStorage. I've done some episodes on it which you can checkout, but it's the official Rails file uploading library and definitely the easiest.
You'll still need to have imagemagick installed. They all use this for the actual cropping and resizing of images.
Carrierwave works too, but it requires some other setup like creating Uploaders so you can define how a file gets processed.
ActiveStorage works a bit different where you define how the file gets resized when you use it in your view. Carrierwave does this as soon as the file is uploaded instead. Both have some advantages but ActiveStorage should definitely be easier.
Ok thank you I'll get to the ressources you provide and I'm sure I'll find what I want. In the end I'll just delete everything about paperclip in the end since it doens't seem at all like the best way to do what I want. The easier the better :) thanks again !
I got some issue when I try to create a new post following your instructions.
ArgumentError in PostsController#create Cannot load `Rails.config.active_storage.service`: unknown keyword: host
But I guess this is because of the subdomain's mecanics that is going on...
So in storage.yml, what should I put for the host: option..?
At first I put 'localhost:5000' and then 'lvh.me:5000' which return to me :
LoadError in PostsController#create Unable to autoload constant ActiveStorage::Blob::Analyzable, expected /home/meaw/.rvm/gems/ruby-2.5.1/gems/activestorage-5.2.2/app/models/active_storage/blob/analyzable.rb to define it
Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.