DEV Community


Discussion on: open source help/discussion thread (v0)

shell_brien profile image
Michelle Brien • Edited


Trying to setup locally on my machine but running into an error after running bin/setup

"1/8 Creating Organizations"
"2/8 Creating Users"
rails aborted!
ActiveRecord::RecordInvalid: Validation failed: Profile image could not download file: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

Has anyone else come across this before as finding it tricky to debug?

The console also throws this error at end of log

== Command ["bin/rails db:setup"] failed ==

So seems like db issues.. is there anything specific I need to do to set this up? I've just been following the installation steps where it only mentions to have postgresql 9.4 or higher (which I have)

Thanks for any help in advance!

andy profile image
Andy Zhao (he/him) Author • Edited

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 profile pic:
remote_profile_image_url: ""

# 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. 😇

shell_brien profile image
Michelle Brien

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 👍

Thread Thread
andy profile image
Andy Zhao (he/him) Author

Awesome, glad it worked! Unfortunate about Bill Murray 🙃

Forem Open with the Forem app