...those. Here are some alternatives: Resort to a hack, like a flag on a service model that makes your methods behave like you are on the correct host.

In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...

Setup the mirror by following the steps described here. If you want to enable OS upgrades using do-release-upgrade...

You can use these step definitions: Then /^I should not see an error$/ do (200 .. 399).should include(page.status_code...

So you probably see the following error trace within your Passenger log file if you got here:

I recently experienced the error ActiveRecord::StatementInvalid: Mysql2::Error: closed MySQL connection. Apparently this happens when there is a timeout...

You can configure a stat socket for haproxy in the global section of the configuration file: global daemon

If you don't want to mess around with arcane incantations inside xorg.conf, you can use the graphical arandr tool...

You're using exception_notification and want to send exception mails within a model. Here's how. The ExceptionNotifier class...

If you want to know the exact hits on your website (or whatever logfile you want) for a specific date...

Use Socket.gethostname. So for a machine whose hostname is "happycat", it will look like this: >> Socket.gethostname => "happycat" That should work...

The exception_notification gem supports to provide custom data to e.g. the fail mail within foreground or background jobs. ExceptionNotifier.notify...

If rspec hangs with no output and you dont get a backtrace neither with --backtrace nor by just killing it...

Controller responses often include Javascript code that contains values from Ruby variables. E.g. you want to call a Javascript function...

There are several options, but most of them are impractical. The best way is to use the :ruby filter:

CarrierWave attachments have two distinct methods #url and #path which appear to behave the same: document.file.url # => /storage/documents/4/letter.doc document.file.path # => /storage/documents/4/letter.doc

The most obvious way to use spring is to call it explicitly: spring rails console spring rake db:migrate...

If you get this error when you try to resize an OpenStack instance: # nova resize example 23 --poll

...trouble will come from. Replace 147.0.0.123 with the client address, log into your web server and run: remote$ sudo tcpdump host 147.0.0.123 and port 80 -s 0 -w /tmp/network.dump

AWstats is build to regularly run on webservers. If you want it to build a report once, here is the...

Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to be the new directory, do it like this:

...your new path. Otherwise MySQL will not start. Load your new AppArmor configuration: sudo service apparmor reload Start MySQL: sudo service mysql start

Sometimes you want/have to send specific http(s) requests. You can do that easy with curl or just write the...

The ActionMailer in Rails 2 depends on a buggy version of TMail, which sometimes inserts a blank line into the...

To obtain a list of Passenger processes with their application directories and memory usages, you can say sudo passenger-memory...