Capistrano: Deployment issue undefined method `[]' for nil:NilClass
In newer passenger versions the output of passenger -v
has changed. capistrano-passenger
tries to parse the version and now causes the error undefined method '[]' for nil:NilClass
. To fix this you only need to upgrade the capistrano-passenger
gem.
Therefore run bundle update capistrano-passenger --conservative
.
The version change of passenger from 6.0.7
to 6.0.8
has triggered this problem. This is fixed in capistrano-passenger >= 0.2.1
.
Related cards:
Fix when assigning nested attributes raises "undefined method `to_sym' for nil:NilClass"
You might have a table without a primary key set in MySQL.
You can fix this by adding a primary key index to the guilty MySQL table, or by setting self.primary_key = "id"
in your class definition.
Related, but different issue: [Rails 2 does no...
SSHKit 1.9.0 failure for Capistrano deploy
SSHKit 1.9.0 might fail with the following error, when trying to deploy a Rail application. Upgrading the gem to version 1.21.0 fixed the issue.
Traceback (most recent call last):
17: from /home/user/.rbenv/versions/2.5.0/lib/ruby/...
Upgrading from Capistrano 2 to 3
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest change is that they moved away from their custom DSL and use Rake
instead. For connecting with and operating on the ...
Slack integration for deployments via Capistrano
You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for you. Its default messages are unobtrusive and can be adjusted...
Remove resource fork files from a FAT volume on MacOS
Be careful!
The following solution will delete files on a volume. If you don't know exactly what you're doing, you can run into big trouble with your computer.
I play mp3 files on my car stereo that are stored on a SD-C...
whenever: Installing cron jobs only for a given Rails environment or Capistrano stage
We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will update all servers with a matching role ([we use the :cron
role ](https://makandracards.com/m...
Fix Rubygems binary error: undefined method `activate_bin_path' for Gem:Module (NoMethodError)
So you're getting an error like this:
undefined method `activate_bin_path' for Gem:Module (NoMethodError)
Here is what happened:
- You installed a recent version of Rubygems
- You installed some gems that install a binary (like `bun...
Fix: "undefined method `bytesize' for #<Array>"
I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print you a pretty error message has a bug and sometimes fails with this message:
"undefined method `bytesize' for #<Array>"...
Undefined method log for Selenium::WebDriver::Remote::W3C::Bridge
In case your integration tests crash with a message like below, try to upgrade Capybara to a newer version (3.35.3 was good enough). You might encounter this issue when you enabled the [w3c option in Selenium](https://makandracards.com/makandra/49...
Speed up Capistrano deployments using a remote cached copy of repository
You can seriously speed up deployments with Capistrano when using a local git repository on the server you are deploying to.
Simply add
set :deploy_via, :remote_cache
set :copy_exclude, [ '.git' ]
to your config/deploy.rb
and Capistr...