re: dev.to open source help/discussion thread (v0) VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hello, Trying to setup locally on my machine but running into an error after running bin/setup "1/8 Creating Organizations" "2/8 Creating Users...
 

Oh that's a strange error. I can't seem to reproduce it, but I think it might be something with the profile_image_url we're using. It's currently randomly generated by a gem, but feel free to replace it with any other valid image. The only non-standard validation we have for images is that its dimensions have to be less than or equal to 4096x4096.

You can replace line #31 in the seeds.rb file with any URL you'd like:

# current version
remote_profile_image_url: Faker::Avatar.image(nil, "300x300", "png", "set2", "bg2")

# change to anything, like your own dev.to profile pic:
remote_profile_image_url: "https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/104515/87d99338-e340-4642-8393-e3731deb5b97.jpg"

# or use random Bill Murray images with 400x400 size:
remote_profile_image_url: Faker::Fillmurray.image(false, 400, 400)

Faker::Fillmurray docs here, if you're so inclined. 😇

 

Thank you!

Yes that was it, I've now been able to get running using my own profile pic. As happy as I am that it's working now am quite sad I've not been able to use the Bill Murray Faker... 😂

For info I was getting a 'redirect' error

ActiveRecord::RecordInvalid: Validation failed: Profile avatar could not download file: redirection forbidden:

...which seemed like it was expecting https in the url, but I couldn't find an easy way to resolve this.

But all good with a non-Faker url for the profile image 👍

Awesome, glad it worked! Unfortunate about Bill Murray 🙃

code of conduct - report abuse