...using Capistrano, a new folder is created within the releases directory on the remote server containing the application code. By default Capistrano 3 keeps the last 5 releases in case...
...HTTP request for every asset and block other assets from being loaded until the server responds with 304 not modified. This will slow down your page loading considerably, and cause...
...unnecessary load on your servers. This card describes how you can setup your application in a way that browsers can properly cache your assets. The caching conundrum A caching solution...
...response includes caching headers like Expires or Cache-Control, their validity depends on the server's Date header if present. Otherwise, the browser uses its local time. This can lead...
...its own local system time. This subtle behavior ensures that cookies remain consistent with server time, even if the client’s clock is incorrect. However, this can lead to unexpected...
...added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server Error) you won't get any love from both application and Apache logs.
...there. It should also fail but you will most likely see this error: Internal Server Error undefined method `new' for "Rack::Bug":String While the following is (for some reason...
...your local development machine (where caching is turned off automatically) but not on the server. To fix this, either: ^ Move all stylesheets to the same folder or have one cache...
If - for whatever reason - you have to render stylesheets dynamically, the following snippet might be of help. It emulates what...
...working on a problem for a client which involves connecting to a Microsoft SQL Server 2005 database from Linux using Ruby. Here’s what I did to get it working...
While deploying an Ruby update to an old application these days, we encountered the following misleading error: *** [err :: some-host.makandra.de] You...
I've got often this error on just one server: Err http://de.archive.ubuntu.com precise/universe amd64 Packages 404 Not Found [IP: 141.30.13.20 80] But there was no problem with the network...
...connection or the de.archive.ubuntu.com server. After I deleted the local lists cache with rm -r /var/lib/apt/lists it works again...
...used to redirects always resulting in a GET request. # Browser sends PATCH /foo HTTP/1.1 # Server responds HTTP/1.1 302 Found Location: /bar # Browser follows redirect PATCH /bar # Server responds
...is neither GET or POST. Some workarounds for this issue below. Fix on the server: Redirect with a modern status code If your redirecting action redirects with a HTTP status...
...send a default ETag by hashing the response body. While this still requires the server to re-render the view for unchanged content, you don't need to send unchanged...
...Network infrastructure may mutate your ETag I recommend to deploy your app to a server and see if you get the same ETag for two responses to the same URL...
...your repository. If not, try to connect to localhost:1234. You can stop the server with git instaweb --stop
...and we want user names to be unique) The requests are accepted on the server by two worker processes who will now process them in parallel Both requests scan the...
...and we want user names to be unique) The requests are accepted on the server by two worker processes who will now process them in parallel Both requests scan the...
...version (e.g. smaller, cropped) on page load. This will create significant load on your servers and effectively forces you to have HTTP caching or a CDN...
This works in IE10+. Make sure that the field name ends in [] so your server-side code will parse the incoming files into an array. Obviously this naming convention...
TLS/SSL certificates are often used for HTTPS traffic. Occasionally a service may also use their TLS certificate to support public-key encrypting data (e.g. when it is part of the...
If Sunspot does not work and fails with a backtrace similar to this: /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response' /project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:164...
...request which is not what you want. Instead a blob is created on the server, the file is uploaded and your form receives a generated hidden input field carrying the...
...false. However, this will also disable a ll other routes like update_rails_disk_service_url which you will need. Another solution would be to call a power that returns...
When you are using Apache for development, it still accepts connections from everyone in the same network as you.
...You'll need it to access shared folders or your host's web server when testing pages in IE. Fun fact: You could also use vbox.srv -- that's the corresponding...
When connecting to multiple (i.e. > 4) servers to dive into logfiles or do security updates, terminator is what you want. There are several keyboard shortcuts available: Ctrl-Shift-E: Split...
There are two ways a logout in SAML can happen: Service Provider (SP) initiated and Identity Provider (IDP) initiated logout. I'll explain how to implement both flows with devise...
...triggers a DELETE /users/sign_out (at least for devise_saml_authenticatable, others might differ) The server generates a SAML LogoutRequest and responds with a redirect the the SingleLogoutService HTTP-Redirect Binding...
...yourself. Do not manipulate package.json yourself. Yarn will do this for you. The dev server If might have noticed that adding webpack made you development server pretty slow. To increase...
...performance, open a separate terminal, and run bin/webpack-dev-server. The dev server will watch all your changes and compile everything automatically in the background. It will also auto-reload your code...
...on WEBrick, put this method into your application controller. def ensure_proper_protocol request.headers['SERVER_SOFTWARE'].andand.include?('WEBrick') || super