For our production servers we use Passenger as a Ruby application server. While it is possible to use Passenger for development as an Apache module, the installation process is not...
Get performance behavior that is closer to what you'll get on production servers Get a full-featured Ruby application server without configuration Usage Install Passenger Standalone with gem...
Running rails server will start a local server that you can access via http://localhost:3000. When you are working on multiple web apps, they will likely set cookies with...
...you switch to another app. A better way is to use our own daho.im service. All daho.im subdomains resolve to your local IP (127.0.0.1). That means you can use a...
...who is managing the identity provider (IDP). But you can setup a local keycloak server to act as your IDP to play around with. This might seam intimidating, but is...
...ADMIN_PASSWORD=admin --volume ./keycloak_data:/opt/keycloak/data/h2/ quay.io/keycloak/keycloak:24.0.2 start-dev The database of the server is persistent and stored in keycloak_data. You can stop the container and restart it...
Sometimes, the rails dev server doesn't terminate properly. This can for example happen when the dev server runs in a RubyMine terminal. When this happens, the old dev server...
...blocks port 3000, so when you try to start a new server, you get the error: Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)
There are two distinct ways of commenting Haml markup: HTML and Ruby. HTML comments This will create an HTML comment...
...your cookies. There is simply no case when the browser would talk to the server via unencrypted http:// requests. Why you might need secure-only cookies anyway A security audit...
...Rails app you can add a middleware that automatically sets the Secure flag to all server-set cookies. The flag is only added for secure requests, so cookies will still...
When you create a temporary file (e.g. to store a generated Excel sheet) and try to send it to the...
...you want Sidekiq to be able to talk to Redis on staging and production servers, you need to add the following to your configuration: # config/initializers/sidekiq.rb require 'sidekiq' Sidekiq.configure_client do...
config.redis = { url: REDIS_URL } end Sidekiq.configure_server do |config| config.redis = { url: REDIS_URL } end The following step may be skipped for new Sidekiq 6+, since it isn't recommended...
...is a single process in play. It runs both your test script and the server responding to the user interactions scripted by your test. A Selenium (Javascript) test has a...
...you spawn by running cucumber. A second thread within the same process runs the server responding to your test. A second process runs the browser that is scripted by the...
Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger
...codecs to your user. A second version with modern standards like WebM can be served to compatible clients. Video Formats and Codecs When talking about digital videos, people often just...
On application servers, gems are usually bundled into the project directory, at a location shared across deployments. This is usually shared/bundle inside your project's root directory, e.g. /var/www/your-project/shared/bundle/.
...gems and whether an update is available All config variables and their values Capistrano server config $ bundle exec cap staging doctor
...with HTTP headers: jQuery will not set the X-Requested-With header. On your server, requests will not look like AJAX requests (request.xhr? will be false). jquery-ujs will not...
...new one. That will take some time and your application should be able to serve files from both storage locations in the meantime. To do that, make store_dir aware...
...following setup allows you to start Terminator in a split view with the Rails server running in the left pane and all remaining processes running via foreman in the right...
type = Terminal parent = child1 profile = default command = env startup_cmd="bundle exec rails server" startup_attrs="-p 3000" bash [[[terminal3]]] type = Terminal parent = child1 profile = default command = 'env startup...
You login to a Linux server with a performance issue: what do you check in the first minute? uptime dmesg | tail vmstat 1 mpstat -P ALL 1 pidstat 1
When you have a multi-server setup, you'll be adding a new server from time to time. Before doing a full deploy, you might want to test that server...
...with is only run for servers matching {:roles=> }, but no servers matched. Instead, specify the server-under-test like this: HOSTFILTER=separate-sidekiq.makandra.de cap production deploy Capistrano is aware of this...
...live-streaming HLS, filled with real-world examples. Using FFmpeg as a HLS streaming server (Part 1) – HLS Basics Using FFmpeg as a HLS streaming server (Part 2) – Enhanced HLS...
Using FFmpeg as a HLS streaming server (Part 3) – Multiple Bitrates Using FFmpeg as a HLS streaming server (Part 4) – Multiple Video Resolutions Using FFmpeg as a HLS streaming...
...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...
...with an ncurses interface. It is designed to find space hogs on a remote server where you don’t have an entire graphical setup available, but it is a useful...
When your application is running on a multi-server setup, application logs are stored per server (unless you choose a centralized logging solution). Here is a Capistrano task that connects...
...to all servers and prints logs to your terminal like this: $ cap production app:logs 00:00 app:logs 01 tail -n0 -F /var/www/your-application/shared/log/production.log | while read line; do echo "$(hostname...
...session) is running: ps -aux|grep vnc If you see Xvnc4 :17 then the server is already running. Kill this server if it is already running. vncserver -kill :17
...make sure to remove the lockfile of the VNC server you just murdered: rm -f /tmp/.X17-lock Geordi should start the server again when it needs it...
...recipe, Capistrano will fail if you deploy to a stage where none of the servers has the role the error complains about, "something" in this case. However, you can hack...
...and tries to call a method that is only available for that group of servers, you'll get another error: `foo.bar' is only run for servers matching {:roles=>:something}, but...