It’s not very obvious at all what’s going on here. Clearly, Drupal is somehow failing to load. I at first thought it was the database connection details not getting loaded properly and ensured that they were OK. But the error persisted.

I wanted to echo the blog post from FillPDF Service here. I’m working on a brand new version that is going to be way easier to use, and won’t be de-facto limited to use via the Drupal module. I’m starting a private beta test soon and opening up an early version to testers.

It’s going to (finally) be a real REST API! Use vanilla PHP, Python, Elixir, whatever, and fill in PDFs without having to upload them to a server first. Most similar services either require that you upload your PDF template in advance or are hard to use. FillPDF Service doesn’t need that, and it won’t begin to. I may add similar features later on, but it will be on top of what’s already there.

I’m very excited about what’s to come. It will be a big change for FillPDF Service.

Anyway, beta testers will get free usage up to a certain point (most likely equivalent to the Clipboard plan, 600 merges) and can pay for more after that. The existing flexible billing features, like flexible overages, will come later. The beta is basically the API without the billing system set up. I’ll be setting that up while people beta test.

I’m…kind of late mentioning that I’m at WordCamp Vienna. The day of sessions was fun and the people were great.

I’m at the Contributor Day now setting up my site in ddev. I use the Fish Shell, so sometimes I have to run commands a bit differently.

After I imported my database, ddev reminded me to properly search-replace the WordPress URL, as one does. It told me:

WordPress sites require a search/replace of the database when the URL is changed. You can run “ddev exec ‘wp search-replace [http://www.myproductionsite.example] http://wizonesolutions.com.ddev.local'” to update the URLs across your database. For more information, see http://wp-cli.org/commands/search-replace/

Vagrant 2.0.3 seems to have changed something from 2.0.2 in terms of its embedded version of nokogiri. This causes errors when running commands such as vagrant status.

Here’s an example of the kind of error you may see:

/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': incompatible library version - /Users/kevin/.vagrant.d/gems/2.4.3/gems/nokogiri-1.8.2/lib/nokogiri/nokogiri.bundle (LoadError)
from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/nokogiri-1.8.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/nokogiri-1.8.2/lib/nokogiri.rb:28:in `<top (required)>'
from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-parallels-1.7.8/lib/vagrant-parallels/driver/base.rb:2:in `<top (required)>'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-parallels-1.7.8/lib/vagrant-parallels/driver/meta.rb:4:in `require_relative'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-parallels-1.7.8/lib/vagrant-parallels/driver/meta.rb:4:in `<top (required)>'
from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-parallels-1.7.8/lib/vagrant-parallels/provider.rb:16:in `usable?'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/vagrantfile.rb:138:in `machine_config'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/vagrantfile.rb:45:in `machine'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/environment.rb:694:in `machine'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-auto_network-1.0.2/lib/auto_network/action/filter_networks.rb:38:in `block in machines_for_env'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-auto_network-1.0.2/lib/auto_network/action/filter_networks.rb:36:in `map'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-auto_network-1.0.2/lib/auto_network/action/filter_networks.rb:36:in `machines_for_env'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-auto_network-1.0.2/lib/auto_network/action/filter_networks.rb:30:in `filter'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-auto_network-1.0.2/lib/auto_network/action/filter_networks.rb:18:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-auto_network-1.0.2/lib/auto_network/action/load_pool.rb:19:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:17:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:17:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
from /Users/kevin/.vagrant.d/gems/2.4.3/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:17:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/environment.rb:504:in `hook'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/lib/vagrant/environment.rb:165:in `initialize'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/bin/vagrant:131:in `new'
from /opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/bin/vagrant:131:in `<main>'

The most likely reason this happens is that plugins using Nokogiri have to build what are called native extensions each time. That means that the end result of that building is specific to your computer and various things on it. If those things change (e.g. Vagrant changes its version of Nokogiri), then the build becomes invalid and has to be redone.

In this case, it has to be redone across the board, and the easiest way is just to reinstall all plugins.

For that, you can use the vagrant plugin expunge --reinstall command.

You can then get back to developing!

(It’s worth noting that the command didn’t work on my older macOS computer, but it did work on my newer one. I’m not really sure why, since they have the same version of Vagrant. I just left the old computer as-was since I didn’t really need to fix it at the time.)

I wasn’t planning on Drupaldelphia OR Drupal Dev Days this year, but I’ll be going to both. If you are too, and want to meet up or talk, get in touch via my contact form above or on Twitter.

P.S. I’m strongly considering going to DrupalCamp Nordics in Stockholm early September and Drupal Iron Camp in/near Belgrade mid-to-late October. Playing with the idea of WordCamp Vienna, too, but that’s much less likely 🙂

You may notice that I haven’t blogged in quite some time. I was busy with a long-term client, so I was focusing more on that than this website. Things changed a bit, and I’ve decided to be more active here.

I have a couple blog posts in the pipeline, one on avoiding a nasty issue when PHPUnit in Drupal 8 to test an API powered by another Drupal 8 site.

I also want to give my impressions of DrupalCamp London 2018, which I attended.

Meanwhile, I’ve updated the site a bit. The old Services page is now the Solutions page. There is also a new Pricing page, which is still in progress.

Do you work with regular expressions sometimes? If you do, and you don’t know about lookbehinds and lookaheads, you are missing out on a fantastic feature. I’m just pasting in something I said to some colleagues. Use your imagination and Google to extract the rest of the blog post 😉

and wound up accidentally with stuff like site.site.nav.create because you double-replaced?
[10/30/14, 10:13:07 PM] Kevin Kaland: if you use the regex (?<!site\.)nav\. for your find then this can’t happen
[10/30/14, 10:13:52 PM] Kevin Kaland: it won’t match it if it already has the site. in front. it’s called a negative lookbehind. negative meaning “it is not there” and lookbehind meaning that it checks before a particular string. there’s also positive look(ahead|behind)s, which make sure things are there.
[10/30/14, 10:14:08 PM] Kevin Kaland: but that text doesn’t become part of the actual match, which is the nice thing