Don鈥檛 simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true:
- if user.photo.present? # always true
= image_tag(user.photo.url)
require 'tempfile' | |
require 'openssl' | |
require 'escape' # gem install escape | |
class CommandFailError < StandardError; end | |
def p12_to_pem_text(p12, pass='') | |
pass = '' if pass.nil? | |
# Use shell command for JRuby (see https://github.com/jruby/jruby-ossl/issues/8) |
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
# see the current limits | |
$ sysctl -a | grep maxproc | |
# increase it | |
$ sudo sysctl -w kern.maxproc=xxxx | |
$ sudo sysctl -w kern.maxprocperuid=xxx | |
# run at startup | |
$ sudo vim /etc/sysctl.conf |
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |
# Traducciones adicionales en https://github.com/plataformatec/devise/wiki/I18n | |
es: | |
devise: | |
confirmations: | |
confirmed: "Tu correo electr贸nico ha sido confirmado exitosamente." | |
send_instructions: "Recibir谩s un email con las instrucciones para confirmar tu correo electr贸nico en unos minutos." | |
send_paranoid_instructions: "Si tu correo electr贸nico existe en nuestra base de datos, recibir谩s un email con las instrucciones para confirmar tu correo electr贸nico en unos minutos." | |
failure: | |
already_authenticated: "Ya iniciaste sesi贸n." |
Based on this tutorial but simplified and inlined. Particularly removed any Rails and 3rd party services part, assumed you just need deployment to any Ubuntu machine.