wtfchamp

Joined

90 Experience
0 Lessons Completed
0 Questions Solved

Activity

gem active_storage_validations 1.0.3
I have two models with "has_one_attached :image", 1 model is created with a form, and the second model is created "after_created callback", when i try to update, the :image for my first model, the validation "attached: true" doesn´t work, the solution that i use is using this line @my_model.image.attach(params[:my_model][:image]) and it works!
But, In my second model, when i try to update the image doing the same logic only works on the first attempt,and the second attempt throws me an error "undefined method 'attachment_reflections' for nil:NilClass", the solution for this and i know is very very very wrong is using puts @my_model.image.attached?.

What am I doing wrong, what errors would it cause in Active Storage and what possible solutions are there?

Thank you for your read my questions and sorry for my bad english )

Posted in Setup Ubuntu 21.04 Hirsute Hippo Discussion

What happen with the other Operating Systems, like OpenSuse?

Posted in Deploy Ubuntu 18.04 Bionic Beaver Discussion

I have the same problem, but I find this on DigitalOcean

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04

I don't know if this is the best way.
I hope this works for you.

Posted in Deploy Ubuntu 18.04 Bionic Beaver Discussion

I fixed this, i miss add .rbenv_bars during installation of Rbenv.

Posted in Deploy Ubuntu 18.04 Bionic Beaver Discussion

Hi guys, i have some problems with the "SECRET_KEY_BASE" in 'cap production deploy' any idea what i'm doing wrong, by the way thank you for the help!

00:25 deploy:assets:precompile
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
01 rake aborted!
01 ArgumentError: Missing secret_key_base for 'production' environment, set this string with rails credentials:edit
01 /home/workb/workb/shared/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application.rb:588:in validate_secret_key_base'
01 /home/workb/workb/shared/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application.rb:423:in
secret_key_base'
01 /home/workb/workb/shared/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application.rb:177:in key_generator'
01 /home/workb/workb/shared/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application.rb:201:in
message_verifier'