...trying to hunt down a staging bug locally), it might make sense to allow reading files from a separate environment. You you could read from an ENV variable instead of...
...of earlier versions Check the official Rails upgrade guide Rails has official upgrade notes. Read through the relevant sections and make the appropriate changes. Get rails console running
...gives some additional security to the not-that-incredibly-secure hashed paths storage approach. Read here for details. Further reading Common mistakes when storing file uploads with Rails
...plain Net::HTTP: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Here is how to fix that in your application...
...RestClient.get('https://self-signed.badssl.com/') RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Self-signed certificates are basically fine, they were simply...
...user into the ETag of all actions def show ... end def index ... end end Read more Default controller implementation (with caching...
...tests with PARALLEL_TEST_PROCESSORS=#{physical_cpu_count}.") end rescue CannotReadCPUCount => e warn('Cannot read CPU count: ' + e.message) end private def process_count if (env_value = ENV['TEST_ENV_NUMBER...
...architecture. Most likely, you need to put [arch=amd64] after deb so that it reads deb [arch=amd64] https://... or deb [arch=amd64 signed-by=.... Workaround Step 2: Connect with...
.../LATEST_RELEASE" VERSION=$(curl -f --silent $VERSION_URL) if [ -z "$VERSION" ]; then echo "Failed to read current version from $VERSION_URL. Aborting." exit 1 else echo "Current version is $VERSION"
...whenever your Chrome is updated, run update-chromedriver and after one second you are ready to go. Example output: $ update-chromedriver Current version is 77.0.3865.40 Downloading to /tmp/chromedriver-77.0.3865.40.zip
...duration // => 210ms An example is storing a transition duration as CSS custom property to read it from Javascript. By converting the value like this, you can ensure your Javascript will...
When requests arrive at the application servers simultaneously, weird things can happen. Sometimes, this can also happen if a user...
...how the SELECT statement at the end is rather short and much easier to read. The CTE SELECTs are also quite readable. Imagine how a JOINed statement would look like...
...convoluted control flow inherently concurrent computer spends no time waiting for IO (accepting request, reading from database, pushing HTML over network) time can be spent by switching to next context...
done: callbacks.done }) } }) } }) } refreshUsers({ done: function() { console.log('Users refreshed!') } ); This is hard to read! If any step in the chain has an error, the chain silently stops Callbacks with...
Code comments allow for adding human readable text right next to the code: notes for other developers, and for your future self. You can imagine comments as post-its (or...
...concept. Probably it is a good idea to mention that concept in the project README, but it should direct the reader to the module for details. In the same manner...
...enables pulling default = current # Match remote branch with same name For more configuration examples, read on. Please only use configuration that you understand. Aliases [alias] amend = commit -v --amend # Amend...
...as new technologies evolve. If you are new to this topic, I strongly recommend reading the MDN guide on audio and video formats. TL;DR: To ensure that the playback...
...FLAC, Opus, Vorbis WEBM CC BY 3.0 / BSD-like VP8, VP9 Opus, Vorbis Further reading: MDN: Media container formats (file types) Video Codec Format Matrix A broader comparison of many...
...was split in many. Fortunately, Git offers a special highlighting mode that directs the reader's attention to relevant code parts: git diff --color-moved=dimmed-zebra
...counts top-level regexp groups, ignoring nested capture groups (I could not confirm that). Read more Upgrading to Cucumber 3.0.0 on cucumber.io
...blog post on the official Ruby blog going into the details. You should probably read that, but here is a slightly abbreviated version: What changed When the last argument of...
...Optimizer squashes it and can shrink SVGs to a fraction of their original size. Read on 5 SVG Gotchas How to scale SVG Visual comparison of different combinations of SVG...
...specs as you can isolate specific parts of the rendered view and then use readable and powerful matchers to assert what you except to see within that part.
This approach allows your view specs to be styled with enhanced readability by isolating the relevant part of the page within a subject block.
When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help. Add super_diff to your project Add super_diff to your...
Info 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/ Read through the Webpack 4 migration guide If your project...
In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you can use the gem smarter_csv for reading (not writing...
Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...