...Gemfile, make sure to exclude these, if they should not be deployed to the servers. The gems of these groups might not be loaded by rails, however, the deployment process...

...will take longer as the gems will be downloaded and installed to the server. e.g. to exclude the groups cucumber and deploy, add the following to config/deploy/production.rb and config/deploy/staging.rb respectively...

...logs all system calls performed by a process. To do this, start your rails server using something like DISABLE_SPRING=1 strace -e trace=file -f bin/rails s

...boxes are usually built by observing changes in a text field, and querying the server via AJAX for search results or suggestions when the field has changed. A common problem...

...field for changes every 0.75 seconds or longer. It will still fail when the server is busy or on flaky connections. A cleaner solution would be to check whether a...

'host' => $host, }) } Instead of exporting a environments::railscomplete::db resource on the application servers we just collectd all the vhosts with a specific dbbackend. A vhost can be configured...

...on multiple servers. If we've used exported resources the environments::railscomplete::db resource type would not contain the resources it contains now but would be a wrapper using an...

...a state transition while updating the record. To process a form with multiple buttons, your server-side code will need to know which button was pressed. To do so you...

github.com

...config the HTML screenshot will reference assets in the same location where your development server usually provides them. Make sure to add this to config/environments/test.rb # Do not generate digests for...

...allow scientific notation like "1e3"). Non-technical users will be confused by this. Your server needs to understand that syntax. If it converts only digits (e.g. to_i in Ruby...

...need to pay attention if you redirect outside of Rails, e.g. via your web server configuration. Dealing with incorrectly cached redirects The only fix is to keep redirecting the user...

...and other secrets available to the job. The output is uploaded to the GitLab server and visible in job logs...

makandra dev

...cause Webpacker (the Rails/Webpack integration) to compile your assets. When you run a dev server While development it is recommended to boot a webpack dev server using bin/webpack-dev-server.

...server compiles once when booted. When you access your page on localhost before the initial compilation, the page may load without assets. The dev server will detect any changes to...

...the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.35 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and...

...response in form round trips, since the id can not be assigned by the server while it may be outputting Unpermitted parameter: :id within the console. You are not setting...

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself. Here we build a simple SVG image and wrap it into...

...attached JSFiddle for an example. Ruby If you like to do it on the server, here is some Ruby for you: def svg_uri(text) svg = <<~SVG #{text} SVG

...To do that you need the secret key which should only live on the servers. Do not download these key files to your local dev environment. They are sensitive and...

Values in the JavaScript API or when submitting forms to the server will always use a point as decimal separator (i.e. "1.23" even when the browser displays...

...a validation a malicious user can quickly exhaust the hard drive of your database server. In legacy Rails (or database schemas migrated from legacy Rails), database types :string and :text...

Getting an entire test suite green can be a tedious task which involves frequent switches between the CLI that is...

up.util.isEqual([1, 2], [1, 2]) // => true If you are writing server-side code in Node.js you can use isDeepStrictEqual(): import { isDeepStrictEqual } from 'util' isDeepStrictEqual([1, 2], [2, 3]) // => false...

developers.google.com

...pages, so to test it in development, you will have to start your development server with SSL...

...an exception has no mapping, Rails will assume a status code of 500 (internal server error) and will render a red "We're sorry, but something went wrong"

upstream sent too big header while reading response header from upstream, client: 192.0.2.100, server: localhost, request: "GET /index.html HTTP/1.1", upstream: "http://198.51.100.123:80/index.html", host: "192.0.2.10:80" The cause

...handle, resulting in a HTTP 503. Due to the error, Nginx marks the upstream server as down for as long as fail_timeout is set to. When enough requests of...

...on all of them. 3) Switch to a persisted storage for sessions on the server Another option to prevent this session replay attack is to switch to persisted storage for...

...hardcoded asset hosts in webpack, otherwise all chunks would be loaded through the # Capybara server of the first test process. If that test process hasn't launched a Capybara

...Webpacker.compile That's it. Enjoy! 🎉 Similar scenario: running an application with Webpacker on multiple servers. How to serve identical assets from all servers...

mail-tester.com

...sender address of the application's domain, our operations team will have configured your servers and DNS records to cover the most obvious cases (SPF records, reverse DNS lookup, etc...