530 Experience
4 Lessons Completed
0 Questions Solved


I have a site where the user can apply a combination of multiple filters.

To improve the SEO on the site I would like to have the URL in a human-readable format when filters are applied.

I would like the URL to be:

Instead of:,spain&surface=grass&with_capacity_of_more_than=20000

This is something that I've seen on NomadList where for example, if the user applies the filter 'walkable' and 'Europe the generated URL will be

Anyone here has any idea on how to build this?

I use the Shrine gem to upload images to AWS S3 from my Rails app.

Now I’m trying to load the asset trough Cloudflare CDN, but then my images fail to load.

Here’s my attempt to implement this

  1. Created an AWS S3 bucket with name
  2. Created a CNAME record in Cloudflare set to: Name: cdn and Host:

Now I can access the XLM for my bucket both trough
* and trough *

3. Then I added this line to my shrine.rb to set the URL HOST to my

plugin :url_options, store: { host: "" }

4) Now. when I start my rail server, all image assets fail to load.
If I copy image address and paste it into my browser it shows error

**Here's the URL generated by the image_tag helper in rails (that is NOT working)**

However if I delete the trailing characters after
The image load properly.

Any suggestions to resolve this would be very much appreciated!

Posted in Import into administrate?

Ah, that solved my issue. Now it works! :)

Thank you so much for your help and these fantastic resources!

Posted in Import into administrate?

Thanks for your reply @Chris!

Been looking at your tutorials for Shrine and CSV imports. And trying to get this to work, using and rake import task. But I'm getting an error when I run the rake task.

rake aborted!
ArgumentError: bad argument (expected URI object or URI string)

Here's my code. Any help to this, would be very much appreciated.

** /lib/tasks/import.rake **

require 'csv'
namespace :import do
desc "Import stadiums from csv"
task stadiums: :environment do
filename = File.join Rails.root, "stadiums.csv"
counter = 0

    CSV.foreach(filename, headers: true) do |row|
    stadium = Stadium.create(name: row["name"],city: row["city"],image: Shrine.remote_url(row["coverphoto"]))

    counter += 1 if stadium.persisted?
    puts "Imported #{counter} stadiums"

** app/uploaders/image_uploaders.rb
class ImageUploader < Shrine
Attacher.validate do
validate_size 1..5*1024*1024
validate_mime_type %w[image/jpeg image/png image/webp image/tiff]
validate_extension %w[jpg jpeg png webp tiff tif]


require "shrine"
require "shrine/storage/file_system"
require "shrine/storage/memory"
require "shrine/storage/s3"

if Rails.env.test?
Shrine.storages = {
cache:, # temporary
store:, # permanent
Shrine.storages = {
cache:"public", prefix: "uploads/cache"), # temporary
store:"public", prefix: "uploads"), # permanent

And in my stadiums_controller I’ve added :image as param.
def stadium_params
params.require(:stadium).permit(:name, :city, :image)

Posted in Import into administrate?

Hi, I think Jumpstart looks really promising and I thinking about using it for my next project.

But I also had some concerns about importing data to my app. I'm used to be doing import via the active-admin-import gem. In the application I'm working on I need to import lots of CSV-files and some of the columns include remote-links to images that I want to import and store on my app/cloud storage.

Is there any Go Rails Episode covering uploading images from CSV files? I can't find much information on that matter.