635114?v=3&s=150

kobaltzPRO

Joined 7/18/2015
635114?v=3&s=64
kobaltz PRO said about 2 months ago:

Hello Drilon, I do not work with PayPal. I disagree with a lot of their practices and chose not to support them. I found that they work well whenever there are no problems, but when a problem did occur, the merchant and buyer both lost and only PayPal benefited.

635114?v=3&s=64
kobaltz PRO said about 1 month ago:

This is common and typically due to the validation failure handling of 

render :new

Have a look at https://stackoverflow.com/a/41520362/722274

One way around this is to do client side validations which I have an example of this at https://www.driftingruby.com/episodes/client-side-validations

635114?v=3&s=64
kobaltz PRO said about 1 month ago:

You could mix and match based on the complexity of the JS needed. You could also look at something like client side validations to prevent the form from posting if the data isn’t valid (but not recommended for uniqueness validations because of potential security reasons).

8439131?v=4&s=64
selzlein said about 1 month ago:

Got it! Thank you :D

635114?v=3&s=64
kobaltz PRO said 23 days ago:

Are you receiving any JavaScript errors in the browser?

635114?v=3&s=64
kobaltz PRO said 21 days ago:

A tip for using Beanstalk Enhanced Health monitoring instead of Basic Health:

For Drifting Ruby's Production environment, my nginx.config looks like this. Take note that the file is not /etc/nginx/conf.d/proxy.conf, but rather /etc/nginx/conf.d/webapp_healthd.conf. This is because we are overwriting the existing default webapp_healthd.conf that beanstalk creates a symlink for. If you do have existing instances with the older proxy.conf, it could create a conflict since we're listening on port 80.

files:
  /etc/nginx/conf.d/webapp_healthd.conf:
    content: |
      client_max_body_size 500M;
      server_names_hash_bucket_size 128;
      upstream backend {
        server unix:///var/run/puma/my_app.sock;
      }
      log_format healthd '$msec"$uri"'
                      '$status"$request_time"$upstream_response_time"'
                      '$http_x_forwarded_for';
      server {
        listen 80;
        server_name _ localhost;
        if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") {
          set $year $1;
          set $month $2;
          set $day $3;
          set $hour $4;
        }
        access_log /var/log/nginx/access.log main;
        access_log /var/log/nginx/healthd/application.log.$year-$month-$day-$hour healthd;
        error_log /var/log/nginx/error.log;
        large_client_header_buffers 8 32k;
        root /var/app/current/public;
        location / {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
          proxy_set_header X-NginX-Proxy true;
          proxy_buffers 8 32k;
          proxy_buffer_size 64k;
          proxy_pass http://backend;
          proxy_redirect off;
          # enables WS support
          location /cable {
            proxy_pass http://backend;
            proxy_http_version 1.1;
            proxy_set_header Upgrade "websocket";
            proxy_set_header Connection "Upgrade";
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          }
        }
        
        location /assets {
          alias /var/app/current/public/assets;
          gzip_static on;
          gzip on;
          expires max;
          add_header Cache-Control public;
        }
        location /public {
          alias /var/app/current/public;
          gzip_static on;
          gzip on;
          expires max;
          add_header Cache-Control public;
        }
      }

container_commands:
  01restart_nginx:
    command: "service nginx restart"

635114?v=3&s=64
kobaltz PRO said 9 days ago:

With MariaDB, it looks like the JSON data type was introduced in 10.2.7. However, instead of a JSON data type, it creates a LONGTEXT.

https://mariadb.com/kb/en/library/json-data-type/

Photo
Wolfgang Barth PRO said 8 days ago:

Thank you for the link. Mysql and JSON seems to be a trap for me. Most linux distributions migrate mysql to mariadb these days. Migrate data to mariadb needs an explicit dump and restore of the related tables or you change the type back to t.text in mysql.

I will go back use t.text an serialize for now.

635114?v=3&s=64
kobaltz PRO said 9 days ago:

Hello Alispat, is there anything in particular you'd like to see about Beanstalk? So far, this series should be enough to get an app running. Honestly, Drifting Ruby is on Beanstalk, and I haven't done much more beyond these configs. I am using Redis and Elasticsearch which are external resources to Beanstalk which may be good to cover since they can be a bit quirky.

635114?v=3&s=64
kobaltz PRO said 8 days ago:

This looks pretty interesting. Any reason, other that it appearing to be self hosted, that interests you about this project?

635114?v=3&s=64
kobaltz PRO said 5 days ago:

Great suggestion. I am waiting for it to hit RC1 before I do this episode. From my experience, things can change quite a bit during the Beta stages.

635114?v=3&s=64
kobaltz PRO said 5 days ago:

I’ve seen this one before. If i remember correctly, it was a fork of spree. Out of curiosity, any opinions of why you prefer this to spree?