...need to index well under 5 million words, FULLTEXT will be fast enough to serve your searches until the project reaches end-of-life. But if you expect your data...

"private": true, "dependencies": { "@rails/webpacker": "^3.0.2", "bought-font": "file:vendor/asset-libs/bought-font" }, "devDependencies": { "webpack-dev-server": "^2.9.5" } } Note the path's prefix file: in the dependency of 'bought-font', which tells...

...value of group_concat_max_len to an insanely high value on every database server your application runs on. Like MAX or COUNT, GROUP_CONCAT is a MySQL aggregation function...

...your normal email account, you might be out of luck: For some reason, Exchange servers will simply throw away the plaintext part of your mail, and just save the html...

...you upgrade to the mysql2 gem, you will run into the problem that the server's database.yml (which is usually not under version control) needs to change exactly on deploy...

...Unfortunately you will leave the situation broken for future bundle install runs on other servers or workstations. Option 2: Add the missing gems to your Gemfile (your best bet)

...This way you can say cap deploy to get the latest code on the server, migrate the database and restart as a default -- if that is what you want...

...workers to 1 and the other requests have to wait. UNICORN_WORKERS=1 rails server

...AJAX like this: var request = new XMLHttpRequest(); request.open('POST', '/my/url', true); request.onload = function() { console.log("Server responded with %o", request.responseText) }; request.send(formData); In jQuery you would send it like this:

...timestamps that Rails uses by default. So to make sure Cloudfront will not server outdated assets, you have to incorporate a timestamp or something similar into the actual filename. This...

...textarea directly, it will lose its value and never send any changes to the server. // Instead, we use a container element and sync any changes into the textarea. $element.hide() session.setValue...

...sql mode in the config/database.yml (and that of all your colleagues, staging and production servers!): development: adapter: mysql2 ... variables: sql_mode: TRADITIONAL (Be aware, that this solution disables the only...

When a has_many association basically serves to store a list of associated strings (tags, categories, ...), it can be convenient to represent this association as a string array in the...

...couldn't set cookies with any browser at all. Solutions Use a dns wildcard service like lvh.me and set :domain => 'lvh.me' if Rails.env.development? Then you can access your local server...

stackoverflow.com

...you the following useless error message. Passenger encountered the following error:\ The application spawner server exited unexpectedly: Unexpected end-of-file detected. Exception class: PhusionPassenger::Rack::ApplicationSpawner::Error

...that is older than mine. Every time I wanted to run my rails dev server I was asked to check my yarn integrity: error Integrity check failed

makandra Operations

...how many reads hit the cache (blks_hit) and how many had to be served FROM disk (blks_read) SELECT schemaname,relname,last_autovacuum,last_autoanalyze,autovacuum_count,autoanalyze_count...

You are not using javascript tests The file is served from a public folder (not via controller) Problem description If you deliver files from a public folder it might...

...content-type "..." Outline How to test file downloads with tests that need javascript. Public served Look at the link of the url and check if this file exists in your...

...know from Rails? Practice Checkout the repo for the makandra blog Start the preview server Make some changes, review them on localhost:4567 Add a new page /animals/your-favorite-animal that has...

...that can be both leaves and containers of other items has_ancestry on the server side Things I learned: Be ready to write a lot of CSS. You need to...

Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...

When talking to your MySQL server via a mysql shell, you can terminate queries by ; or \G -- the latter gives you a vertical output. You know this: mysql> SELECT * FROM...

...the bucket as private and fetch the appropriate files from S3 to your application server and stream them to the client finally. While this is possible, I'd recommend to...

...your_model.document.expiring_url => "http://s3-eu-west-1.amazonaws.com/your-bucket/files/foo/bar/123/456/ab/cd/1/2/3/original/Attachment.pdf?AWSAccessKeyId=ABSJASHJK232JAHBS&Signature=V6aJhal2kaB4bxKal23lSMV%2F9w%3D&Expires=1347889426" The expiring_url method carries out a web service call to S3 to gain the data for AWSAccessKeyId and Signature being used within the URL...

You can configure VCR to automatically record/replay cassettes for any RSpec example tagged as :vcr or vcr: true.