<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cube Websites</title>
	<atom:link href="https://cubewebsites.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://cubewebsites.com/</link>
	<description>web design and development</description>
	<lastBuildDate>Wed, 23 Aug 2023 19:06:41 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://cubewebsites.com/wp-content/uploads/2019/04/cropped-favicon-32x32.png</url>
	<title>Cube Websites</title>
	<link>https://cubewebsites.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Fix: SSH No Matching Host Key Type Found</title>
		<link>https://cubewebsites.com/guides/fix-ssh-no-matching-host-key-type-found/</link>
					<comments>https://cubewebsites.com/guides/fix-ssh-no-matching-host-key-type-found/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Wed, 23 Aug 2023 19:06:40 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Hosting]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1229</guid>

					<description><![CDATA[<p>Earlier I was connecting to a client server via SSH when I received the following error: After looking up the error I was able to fix this by using the following instructions: On your local machine, edit/create ~/.ssh/config Add this (replace the x&#8217;s with the server IP) Host x.x.x.x HostKeyAlgorithms=+ssh-dss After this try connecting. You [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/fix-ssh-no-matching-host-key-type-found/">Fix: SSH No Matching Host Key Type Found</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Earlier I was connecting to a client server via SSH when I received the following error:</p>



<pre class="wp-block-code"><code>Unable to negotiate with x.x.x.x port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss</code></pre>



<p>After looking up the error I was able to fix this by using the following instructions:</p>



<p>On your local machine, edit/create ~/.ssh/config</p>



<p>Add this (replace the x&#8217;s with the server IP)</p>



<pre class="wp-block-preformatted">Host x.x.x.x
    HostKeyAlgorithms=+ssh-dss</pre>



<p>After this try connecting. You may need to remove the host from your known hosts first&#8230;</p>



<p>Edit ~/.ssh/known_hosts</p>



<p>Search for your server IP, and remove any matching line(s)</p>



<p>That&#8217;s all, after this you&#8217;ll be able to reconnect using your existing keys</p>
<p>The post <a href="https://cubewebsites.com/guides/fix-ssh-no-matching-host-key-type-found/">Fix: SSH No Matching Host Key Type Found</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/fix-ssh-no-matching-host-key-type-found/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>HOW TO: SETUP PEST PHP 2 WITH LARAVEL 10+</title>
		<link>https://cubewebsites.com/development/laravel/how-to-setup-pest-php-2-with-laravel-10/</link>
					<comments>https://cubewebsites.com/development/laravel/how-to-setup-pest-php-2-with-laravel-10/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Tue, 06 Jun 2023 14:14:46 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[testing]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1221</guid>

					<description><![CDATA[<p>This guide shows quick steps on how to use the current version of the PEST PHP Testing Framework with Laravel 10. This guide has been written with the current latest versions of the libraries: InsTALLATION The above should output the installed PEST version, which in my case is 2.6.2 The output here should be the [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/development/laravel/how-to-setup-pest-php-2-with-laravel-10/">HOW TO: SETUP PEST PHP 2 WITH LARAVEL 10+</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This guide shows quick steps on how to use the current version of the PEST PHP Testing Framework with Laravel 10.</p>



<p>This guide has been written with the current latest versions of the libraries:</p>



<ul class="wp-block-list">
<li>PEST 2.6.2</li>



<li>Laravel 10.13.1 </li>
</ul>



<h2 class="wp-block-heading">InsTALLATION</h2>



<ul class="wp-block-list">
<li>Install Laravel using any of their methods detailed in the <a href="https://laravel.com/docs/10.x/installation" target="_blank" rel="noreferrer noopener nofollow">Official Documentation</a></li>



<li>Install PEST using Composer.  The flags in this command are very important as it&#8217;s likely that you&#8217;ll have conflicting dependencies and this will take care of that for you:</li>
</ul>



<pre class="wp-block-code"><code>composer require pestphp/pest --dev --with-all-dependencies</code></pre>



<ul class="wp-block-list">
<li>Install the Laravel Plugin for PEST</li>
</ul>



<pre class="wp-block-code"><code>composer require pestphp/pest-plugin-laravel --dev</code></pre>



<ul class="wp-block-list">
<li>At this stage the installation should be complete and running the following you can verify that things are working as they should</li>
</ul>



<pre class="wp-block-code"><code>./vendor/bin/pest --version</code></pre>



<p>The above should output the installed PEST version, which in my case is 2.6.2</p>



<pre class="wp-block-code"><code>php artisan pest</code></pre>



<p>The output here should be the &#8216;Available commands for the &#8220;pest&#8221; namespace</p>



<h2 class="wp-block-heading">Installation Troubleshooting</h2>



<pre class="wp-block-code"><code>Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update pestphp/pest
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - pestphp/pest&#91;v0.1.0, ..., v0.2.4] require php ^7.3 -> your php version (8.1.19) does not satisfy that requirement.
    - pestphp/pest&#91;v0.3.0, ..., v0.3.19, v1.0.0, ..., v1.4.0] require nunomaduro/collision ^5.0 -> found nunomaduro/collision&#91;v5.0.0, ..., v5.11.0] but it conflicts with your root composer.json require (^7.0).
    - pestphp/pest&#91;v1.5.0, ..., v1.17.0] require nunomaduro/collision ^5.4.0 -> found nunomaduro/collision&#91;v5.4.0, ..., v5.11.0] but it conflicts with your root composer.json require (^7.0).
    - pestphp/pest&#91;v1.18.0, ..., v1.21.1] require nunomaduro/collision ^5.4.0|^6.0 -> found nunomaduro/collision&#91;v5.4.0, ..., v5.11.0, v6.0.0, ..., v6.4.0] but it conflicts with your root composer.json require (^7.0).
    - pestphp/pest&#91;v1.21.2, ..., v1.22.1] require nunomaduro/collision ^5.10.0|^6.0 -> found nunomaduro/collision&#91;v5.10.0, v5.11.0, v6.0.0, ..., v6.4.0] but it conflicts with your root composer.json require (^7.0).
    - pestphp/pest&#91;v1.22.2, ..., v1.22.5] require nunomaduro/collision ^5.11.0|^6.3.0 -> found nunomaduro/collision&#91;v5.11.0, v6.3.0, v6.3.1, v6.3.2, v6.4.0] but it conflicts with your root composer.json require (^7.0).
    - pestphp/pest&#91;v1.22.6, ..., v1.23.0] require nunomaduro/collision ^5.11.0|^6.4.0 -> found nunomaduro/collision&#91;v5.11.0, v6.4.0] but it conflicts with your root composer.json require (^7.0).
    - pestphp/pest v2.6.2 conflicts with phpunit/phpunit >10.2.0.
    - pestphp/pest v2.6.1 conflicts with phpunit/phpunit >10.1.3.
    - pestphp/pest&#91;v2.5.3, ..., v2.6.0] conflict with phpunit/phpunit >10.1.2.
    - pestphp/pest&#91;v2.5.1, ..., v2.5.2] conflict with phpunit/phpunit >10.1.1.
    - pestphp/pest v2.5.0 conflicts with phpunit/phpunit >10.1.0.
    - pestphp/pest&#91;v2.3.0, ..., v2.4.0] conflict with phpunit/phpunit >10.0.19.
    - pestphp/pest&#91;v2.2.1, ..., v2.2.3] conflict with phpunit/phpunit >10.0.18.
    - pestphp/pest&#91;v2.0.2, ..., v2.2.0] conflict with phpunit/phpunit >10.0.17.
    - pestphp/pest v2.0.1 conflicts with phpunit/phpunit >10.0.16.
    - phpunit/phpunit is locked to version 10.2.1 and an update of this package was not requested.
    - Root composer.json requires pestphp/pest * -> satisfiable by pestphp/pest&#91;v0.1.0, ..., v0.3.19, v1.0.0, ..., v1.23.0, v2.0.1, ..., v2.6.2].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require pestphp/pest:*" to figure out if any version is installable, or "composer require pestphp/pest:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.</code></pre>



<p>If you see the error above, check the composer require command that you ran.  You&#8217;ll need the flags displayed above to allow Composer to update your dependencies to satisfy PEST and Laravel.</p>



<h2 class="wp-block-heading">Configuration</h2>



<p>After installation you&#8217;ll find you can run the existing Laravel Example tests with the Pest command.  This is because Pest is built on top of PHPUnit in a progressive manner.</p>



<p>If you try writing your own test e.g. consider the following:</p>



<pre class="wp-block-code"><code>&lt;?php

it('makes an example request', function () {
    $response = $this->get('/');
    $response->assertStatus(200);
});
</code></pre>



<p>You may get an error like the following:</p>



<pre class="wp-block-code"><code>  FAILED  Tests\Feature\ExampleRequestTest > it get an example request                                                                                                                                                                                                 Error
  Call to undefined method Tests\Feature\ExampleRequestTest::get(). Did you forget to use the &#91;uses()] function? Read more at: https://pestphp.com/docs/configuring-tests

  at tests/Feature/ExampleRequestTest.php:4
      1▕ &lt;?php
      2▕
      3▕ it('get an example request', function () {
  ➜   4▕     $response = $this->get('/');
      5▕     $response->assertStatus(200);
      6▕ });
      7▕

  1   tests/Feature/ExampleRequestTest.php:4


  Tests:    2 failed, 2 passed (2 assertions)
  Duration: 0.08s</code></pre>



<p>This is because Pest is not yet configured to use the Laravel TestCase which includes the additional methods such as <code>get</code>, <code>post</code>, <code>actingAs</code> etc. </p>



<p>To solve this we create a new file:</p>



<pre class="wp-block-code"><code>./tests/Pest.php</code></pre>



<p>Add the following into the file</p>



<pre class="wp-block-code"><code>&lt;?php
uses(\Tests\TestCase::class)->in('Feature');
uses(\Tests\TestCase::class)->in('Unit');</code></pre>



<p>This tells Pest to use the Laravel TestCase in your Feature and Unit tests and makes the additional methods available to your Pest tests.</p>



<p>You can now run the test again, and this time it should run without the error</p>



<h2 class="wp-block-heading">Database Setup (Optional)</h2>



<p>Unit tests test blocks of code and so don&#8217;t require the Laravel application to start.  However, with Feature tests you&#8217;ll find that they do boot the Laravel application and everything within &#8211; including a database connection.  By default, it will connect to whatever you Database Connection is defined as in your <code>.env</code> file which means your tests end up writing to your dev database.  This may be fine, but I prefer keeping a separate databases for Dev and Testing.</p>



<p>There&#8217;s a number of ways to do this including using SQLite, but I find it&#8217;s better to run the same database type as I will be using in production to avoid any unforeseen issues.  The easiest way to do this is to create a second database and then configure the connection using a <code>.env.testing</code> file &#8211; more information on this is available in the <a href="https://laravel.com/docs/10.x/testing#the-env-testing-environment-file" target="_blank" rel="noreferrer noopener nofollow">Laravel Docs</a>.</p>



<h2 class="wp-block-heading">Summary</h2>



<p>I hope this guide helps anyone looking for a current installation of Laravel and Pest.</p>
<p>The post <a href="https://cubewebsites.com/development/laravel/how-to-setup-pest-php-2-with-laravel-10/">HOW TO: SETUP PEST PHP 2 WITH LARAVEL 10+</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/development/laravel/how-to-setup-pest-php-2-with-laravel-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To: Setup Content Translations In Directus</title>
		<link>https://cubewebsites.com/guides/how-to-setup-content-translations-in-directus/</link>
					<comments>https://cubewebsites.com/guides/how-to-setup-content-translations-in-directus/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Thu, 05 Jan 2023 11:50:41 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[directus]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1201</guid>

					<description><![CDATA[<p>I&#8217;ve recently been playing with Directus as a backend for some small projects. One of the great features that Directus provides is translation support which I decided to try out. Unfortunately, it when it came to the setup I couldn&#8217;t find much documentation on this so it took me a bit of read and some [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/how-to-setup-content-translations-in-directus/">How To: Setup Content Translations In Directus</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve recently been playing with Directus as a backend for some small projects.  One of the great features that Directus provides is translation support which I decided to try out.  Unfortunately, it when it came to the setup I couldn&#8217;t find much documentation on this so it took me a bit of read and some trial and error to figure it out. </p>



<p>This articles shares my findings and shows how easy it is to setup.</p>



<h2 class="wp-block-heading">Setup your collection</h2>



<p>Select an existing (or create a new collection) that you want translations for.  Don&#8217;t add any fields that need translations just yet!</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="372" src="https://cubewebsites.com/wp-content/uploads/2023/01/image-1024x372.png" alt="" class="wp-image-1202" srcset="https://cubewebsites.com/wp-content/uploads/2023/01/image-980x356.png 980w, https://cubewebsites.com/wp-content/uploads/2023/01/image-480x174.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw" /><figcaption class="wp-element-caption">An example of a categories collection that we want to add translations to</figcaption></figure>



<p>Next, click on Create Field and choose the &#8216;Translations&#8217; type field:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="842" height="1024" src="https://cubewebsites.com/wp-content/uploads/2023/01/image-1-842x1024.png" alt="" class="wp-image-1203"/><figcaption class="wp-element-caption">The default options for the Translation field are fine for now</figcaption></figure>



<p>If you like you can modify some of the field configuration by clicking the <code>Continue in Advanced Field Creation Mode</code>.  For example I prefer using UpperCamelCase for my table names, so I modified the <code>languages</code> table name to <code>Languages</code></p>



<h2 class="wp-block-heading">Setup Translation Fields</h2>



<p>Once you&#8217;ve done that go back to the <code>Data Model</code> screen.  Here you&#8217;ll see a new hidden collection, in my case <code>Categories Translations</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="84" src="https://cubewebsites.com/wp-content/uploads/2023/01/image-3-1024x84.png" alt="" class="wp-image-1205" srcset="https://cubewebsites.com/wp-content/uploads/2023/01/image-3-980x80.png 980w, https://cubewebsites.com/wp-content/uploads/2023/01/image-3-480x39.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw" /></figure>



<p>Click into the <code>Categories_Translations</code> table, and within this collection add all the fields for <code>Categories</code> that need translations. e.g.:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="527" src="https://cubewebsites.com/wp-content/uploads/2023/01/image-4-1024x527.png" alt="" class="wp-image-1206" srcset="https://cubewebsites.com/wp-content/uploads/2023/01/image-4-980x504.png 980w, https://cubewebsites.com/wp-content/uploads/2023/01/image-4-480x247.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw" /><figcaption class="wp-element-caption">The id, Categories_id, Languages_id fields are created automatically when you setup the translations on Categories.  I added Name and Description</figcaption></figure>



<h2 class="wp-block-heading">Add Translated Content</h2>



<p>Now, go to the Content menu and choose your collection.  You&#8217;ll see the fields you&#8217;ve added to the Translations table appear with the option to fill them out in different languages.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="928" src="https://cubewebsites.com/wp-content/uploads/2023/01/image-5-1024x928.png" alt="" class="wp-image-1207" srcset="https://cubewebsites.com/wp-content/uploads/2023/01/image-5-980x888.png 980w, https://cubewebsites.com/wp-content/uploads/2023/01/image-5-480x435.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw" /><figcaption class="wp-element-caption">Example of adding translated content</figcaption></figure>



<p>Here you can use the Translations input to select a language, and then use the input fields below to populate the content in your selected Language.  There&#8217;s even a split view which is very handy if you&#8217;re translating content from one language to another.</p>



<h2 class="wp-block-heading">Managing Languages</h2>



<p>You can control which Languages appear by modifying the entries in the Languages collection.  By default Directus populates that table with 8 common languagues.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="867" height="1024" src="https://cubewebsites.com/wp-content/uploads/2023/01/image-6-867x1024.png" alt="" class="wp-image-1208" srcset="https://cubewebsites.com/wp-content/uploads/2023/01/image-6-867x1024.png 867w, https://cubewebsites.com/wp-content/uploads/2023/01/image-6-480x567.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 867px, 100vw" /></figure>



<p>Hopefully this demonstrates how easy it is to add translated content in Directus.  Of course, if there&#8217;s fields that don&#8217;t need translation you just add them in the parent table &#8211; in this case the <code>Categories</code> collection.</p>



<p></p>
<p>The post <a href="https://cubewebsites.com/guides/how-to-setup-content-translations-in-directus/">How To: Setup Content Translations In Directus</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/how-to-setup-content-translations-in-directus/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>HOW TO: Using Laravel with Directus 9</title>
		<link>https://cubewebsites.com/development/laravel/how-to-using-laravel-with-directus-9/</link>
					<comments>https://cubewebsites.com/development/laravel/how-to-using-laravel-with-directus-9/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Tue, 03 Jan 2023 15:21:16 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[directus]]></category>
		<category><![CDATA[laravel]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1199</guid>

					<description><![CDATA[<p>If you need to use Directus with Laravel then this guide will take you through the steps needed to get connected in just a few minutes. The general idea is to use a composer package to interact with Directus. We&#8217;ll register it in our AppServiceProvider which means we can call a pre-configured instance anywhere in [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/development/laravel/how-to-using-laravel-with-directus-9/">HOW TO: Using Laravel with Directus 9</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you need to use Directus with Laravel then this guide will take you through the steps needed to get connected in just a few minutes.</p>



<p>The general idea is to use a composer package to interact with Directus.  We&#8217;ll register it in our AppServiceProvider which means we can call a pre-configured instance anywhere in our app using dependency-injection.</p>



<p><strong>In Directus</strong></p>



<ul class="wp-block-list">
<li>It&#8217;s advisable to create a new role for your Laravel Application.  To make it easy to track I give it the name &#8216;laravel-app&#8217;</li>



<li>Create a new user for your Laravel Application and assign it the new Role you just created</li>



<li>On the Edit User screen, find the &#8216;Token&#8217; field.  Generate a token and <strong>make a note of it somewhere</strong></li>
</ul>



<p><strong>In Laravel</strong></p>



<ul class="wp-block-list">
<li>Now switch to your Laravel app.  For this integration, I&#8217;m using a composer package from https://github.com/alantiller/directus-php-sdk</li>



<li>Install the package:</li>
</ul>



<pre class="wp-block-code"><code>composer require alantiller/directus-php-sdk</code></pre>



<ul class="wp-block-list">
<li>In your <code>.env</code> file add the following:</li>
</ul>



<pre class="wp-block-code"><code>DIRECTUS_URL=https://directus.example.com
DIRECTUS_TOKEN=-YOURTOKEN</code></pre>



<ul class="wp-block-list">
<li>Replace the Url with your actual Directus URL</li>



<li>Replace YOURTOKEN with the Token you generated for your Laravel user in Directus</li>



<li>In config/services.php add the following:</li>
</ul>



<pre class="wp-block-code"><code>'directus' =&gt; &#91;<br>    'url'   =&gt; env('DIRECTUS_URL'),<br>    'token' =&gt; env('DIRECTUS_TOKEN'),<br>],</code></pre>



<p>In app/providers/AppServiceProvider.php add the following to the <code>register()</code> method</p>



<pre class="wp-block-code"><code>$this-&gt;app-&gt;singleton(Directus::class, function ($app) {<br>    $directus = new Directus($app&#91;'config']&#91;'services']&#91;'directus']&#91;'url'],'');<br>    $directus-&gt;auth_token($app&#91;'config']&#91;'services']&#91;'directus']&#91;'token']);<br>    return $directus;<br>});</code></pre>



<p>In your code you&#8217;ll be able to now use Directus with the standard dependency injection.  You can find examples on how to use the <a href="https://github.com/alantiller/directus-php-sdk" target="_blank" rel="noreferrer noopener nofollow">alantiller/directus-php-sdk package on Github</a>.</p>



<p>Example:</p>



<pre class="wp-block-code"><code>php artisan make:command DirectusTest</code></pre>



<p>In the <code>handle</code> method of the generated command:</p>



<pre class="wp-block-code"><code>&lt;?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class DirectusTest extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'directus:test';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle(\Slations\DirectusSdk\Directus $directus)
    {
        dd($directus->users_me());
    }
}</code></pre>



<p>Call the command:</p>



<pre class="wp-block-code"><code>php artisan directus:tset</code></pre>



<p>The output should show you details of the Laravel App user you added on Directus.  Once it&#8217;s working delete the command.</p>



<p>This is all it takes to have a fully working Directus integration with Laravel.  The package does most of the work, but registering it in your AppServiceProvider means you&#8217;ll get a connected instance whenever you need to use it instead of having to instantiate it.</p>



<p>Note that this application uses an application token which is tied to a single user.  If you need multi-user support then the package supports <code>login</code> so you can authenticate users and use their auth token.</p>
<p>The post <a href="https://cubewebsites.com/development/laravel/how-to-using-laravel-with-directus-9/">HOW TO: Using Laravel with Directus 9</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/development/laravel/how-to-using-laravel-with-directus-9/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To: Check Which Docker Container Is Using A Port</title>
		<link>https://cubewebsites.com/guides/how-to-check-which-docker-container-is-using-a-port/</link>
					<comments>https://cubewebsites.com/guides/how-to-check-which-docker-container-is-using-a-port/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Tue, 03 Jan 2023 12:30:23 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1197</guid>

					<description><![CDATA[<p>This morning I had a Docker service fail to start. On inspection of the error, it turned out it was because the port was in use by another service. In this particular case, my Docker service was trying to use port 8029 so that&#8217;s what I&#8217;ve used in the examples below. This searches through your [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/how-to-check-which-docker-container-is-using-a-port/">How To: Check Which Docker Container Is Using A Port</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This morning I had a Docker service fail to start.  On inspection of the error, it turned out it was because the port was in use by another service.  In this particular case, my Docker service was trying to use port 8029 so that&#8217;s what I&#8217;ve used in the examples below.</p>



<pre class="wp-block-code"><code>docker ps | grep 8029</code></pre>



<p>This searches through your docker containers, and finds any that are running on port 8029.  The output should look like this:</p>



<pre class="wp-block-code"><code>fec0c35f0b2d directus/directus:latest "docker-entrypoint.s…" 15 minutes ago Up 5 minutes 127.0.0.1:8029->8055/tcp directus-example</code></pre>



<p>In the above example you can see that port 8029 was identified to be in use by the directus-example container.  It turns out I did a test install of Directus on that port, and then forgot to delete it.</p>



<p>Stop the docker container:</p>



<pre class="wp-block-code"><code>docker stop fec0c35f0b2d</code></pre>



<p>The container ID (<code>fec0c35f0b2d</code>) used above is from the first command which provided the container ID</p>



<p>Delete the docker container. In my case I no longer needed this Directus container, so I deleted the container too.  If you need to keep your container, then just change its configuration to run on a different port that doesn&#8217;t clash.</p>



<pre class="wp-block-code"><code>docker rm fec0c35f0b2d</code></pre>



<p>With this complete, I was able to start the Docker container that&#8217;s actually supposed to be running on port 8029 with no issues.</p>



<p>In my case I knew that the port would be used by Docker because I use that port range for Docker only.  If you don&#8217;t know for sure that it&#8217;s Docker using the port, then you can use the following to check which service is using the port.  Note that you will need sudo access to run this.</p>



<pre class="wp-block-code"><code>sudo netstat -tulpn | grep 8029</code></pre>



<p>The output from this should tell you which service is using that port.</p>
<p>The post <a href="https://cubewebsites.com/guides/how-to-check-which-docker-container-is-using-a-port/">How To: Check Which Docker Container Is Using A Port</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/how-to-check-which-docker-container-is-using-a-port/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Guide: Using n8n to Send New WordPress Posts to Mastodon</title>
		<link>https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/</link>
					<comments>https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Mon, 02 Jan 2023 16:43:25 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[directus]]></category>
		<category><![CDATA[mastodon]]></category>
		<category><![CDATA[n8n]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1192</guid>

					<description><![CDATA[<p>Lately I&#8217;ve been interested in using Mastodon as a social media platform. In previous efforts I used the ActivityPub plugin to automatically push new posts to Mastodon, but unfortunately this came with a lot of limitations. I&#8217;ve now setup a new integration which uses some additional tools (Directus and n8n) to help with this process. [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/">Guide: Using n8n to Send New WordPress Posts to Mastodon</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Lately I&#8217;ve been interested in using Mastodon as a social media platform.  In previous efforts I used the ActivityPub plugin to automatically push new posts to Mastodon, but unfortunately this came with a lot of limitations.</p>



<p>I&#8217;ve now setup a new integration which uses some additional tools (Directus and n8n) to help with this process.  The below provides a quick run-through of the process and explanation of this approach.</p>



<h2 class="wp-block-heading">Advantages</h2>



<p>Directus provides a quick way of creating an API around data models.  They offer a free cloud version which is perfect for this small-scale integration.  It can also be self-hosted in a number of ways, including using Docker which makes it very easy to setup.</p>



<p>Note that you don&#8217;t necessarily need Directus &#8211; you could use a database (e.g. MySQL) and replace the n8n API calls with database queries instead.</p>



<p>n8n (nodemation) is a powerful automation tool similar to Zapier or Logic Apps.  You can build workflows to help you achieve complicated processes using simple building blocks.  This also has a Cloud version (paid) or a self-hosted version.</p>



<p>Using the above means that I have far more control over what is going out to Mastodon, and can easily be expand to cover additional platforms e.g. Telegram, Slack or Teams.</p>



<ul class="wp-block-list">
<li>messages can be customised to your liking</li>



<li>messages can be deleted if a post is updated, and you can resubmit</li>



<li>you use your own Mastodon account so your profile can be managed fully</li>
</ul>



<h2 class="wp-block-heading">The Process</h2>



<ol class="wp-block-list">
<li>In Directus create a Collection called &#8216;rss_feed_items&#8217; with a field called &#8216;guid&#8217;.  This is used to track posts which have already been sent to Mastodon to prevent duplicates</li>



<li>In n8n, use a Schedule trigger to run every 5 minutes or so</li>



<li>Use the RSS block to fetch the RSS feed for your WordPress blog</li>



<li>Use the HTTP block to get a list of existing guids from the Directus API</li>



<li>Use the Merge block to keep only new blog posts</li>



<li>Use a Code block to prepare the message for Mastodon i.e. get the title, link and convert the categories to hashtags</li>



<li>Use the Mastodon block to post the message to Mastodon.  This is a third-party block at the moment.</li>



<li>Use the HTTP block to call the Directus API and create a record for the guid of the blog post</li>
</ol>



<p>Using this method, if a blog post is updated, I can just edit my post on Mastodon.  It could actually be made more sophisticated by keeping the Mastodon status ID and Mastodon post content in Directus with the GUID, and then if the new content is different to the old n8n can delete the old post and create a new post for you.</p>



<p>Note that on the first run, it will send all the posts that appear on your current RSS feed to Mastodon. </p>



<p>Enjoy!</p>
<p>The post <a href="https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/">Guide: Using n8n to Send New WordPress Posts to Mastodon</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>HOW TO: Using Laravel with Vite on MAMP</title>
		<link>https://cubewebsites.com/development/laravel/how-to-using-laravel-with-vite-on-mamp/</link>
					<comments>https://cubewebsites.com/development/laravel/how-to-using-laravel-with-vite-on-mamp/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Wed, 28 Dec 2022 11:34:42 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[vite]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1186</guid>

					<description><![CDATA[<p>I recently needed to help someone out who was using MAMP on a MacBook Pro on a Laravel 9 project. The project was configured to: The Problem When running the default project with yarn run dev and accessing the project in the browser via the hostname configured in MAMP, the hot reload feature was not [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/development/laravel/how-to-using-laravel-with-vite-on-mamp/">HOW TO: Using Laravel with Vite on MAMP</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I recently needed to help someone out who was using MAMP on a MacBook Pro on a Laravel 9 project.</p>



<p>The project was configured to:</p>



<ul class="wp-block-list">
<li>run on MAMP</li>



<li>the MAMP host was configured to use SSL</li>



<li>Laravel 9</li>



<li>Vite</li>



<li>InertiaJS</li>
</ul>



<h2 class="wp-block-heading">The Problem</h2>



<p>When running the default project with <code>yarn run dev</code> and accessing the project in the browser via the hostname configured in MAMP, the hot reload feature was not working and the network and console tabs in Developer Tools were polluted with lots of 404 errors about the failure to connect to the Vite Ping URL e.g. <code>__vite_ping</code> to which it keeps trying to reconnect to.</p>



<h2 class="wp-block-heading">How to fix</h2>



<p>You have to configure Vite to run on https.  This can be done in a number of ways, but the easiest is to use the <a href="https://www.npmjs.com/package/@vitejs/plugin-basic-ssl" target="_blank" rel="noreferrer noopener nofollow">@vitejs/plugin-basic-ssl</a> plugin.  It&#8217;s really easy to get started:</p>



<ol class="wp-block-list">
<li>Add the plugin to your project
<ul class="wp-block-list">
<li>with yarn: <code>yarn add --dev @vitejs/plugin-basic-ssl</code></li>



<li>with npm: <code>npm i @vitejs/plugin-basic-ssl</code></li>
</ul>
</li>



<li>Open the <code>vite.config.js</code> file in your Laravel project</li>



<li>Import the plugin at the top of the file:
<ul class="wp-block-list">
<li><code>import basicSsl from '@vitejs/plugin-basic-ssl'</code></li>
</ul>
</li>



<li>Enable the plugin using the defineConfig block e.g.</li>
</ol>



<pre class="wp-block-preformatted">export default {
  plugins: [
    basicSsl()
  ]
}</pre>



<p>Note: you might already have other plugins or config options in the <code>defineConfig</code> block, but you just need to make sure you add the called to <code>basicSsl()</code> in the plugins section.</p>



<p>After this when you run your project using <code>yarn run dev</code> it will provide you with a Local URL e.g.</p>



<pre class="wp-block-code"><code>11:15:06 &#91;vite] vite.config.js changed, restarting server...
11:15:06 &#91;vite] server restarted.

  > Local: https://localhost:3000/
  > Network: use `--host` to expose</code></pre>



<p>Open that Local URL in your browser and you&#8217;ll receive an SSL warning.  Accept the risks to accept the SSL certificate generated by the plugin.</p>



<p>Once that&#8217;s done when you visit your application dev URL, you&#8217;ll see all the Vite 404 errors have disappeared and you&#8217;re left with one neat little log that tells you Vite is now connected.</p>



<pre class="wp-block-code"><code>&#91;vite] connecting... <a href="https://127.0.0.1:3000/src/client/client.ts">client.ts:16:8</a>
&#91;vite] connected. client.ts:53:14</code></pre>



<p>Hope this helps!</p>
<p>The post <a href="https://cubewebsites.com/development/laravel/how-to-using-laravel-with-vite-on-mamp/">HOW TO: Using Laravel with Vite on MAMP</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/development/laravel/how-to-using-laravel-with-vite-on-mamp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To: Add Your WordPress Blog to the Fediverse</title>
		<link>https://cubewebsites.com/guides/how-to-add-your-wordpress-blog-to-the-fediverse/</link>
					<comments>https://cubewebsites.com/guides/how-to-add-your-wordpress-blog-to-the-fediverse/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Tue, 27 Dec 2022 22:09:51 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[fediverse]]></category>
		<category><![CDATA[mastodon]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1184</guid>

					<description><![CDATA[<p>This article is based on the already well-written article on Fedi.Tips. The idea is to automatically make all your blog posts on WordPress available on the Fediverse that people can follow on their apps such as Mastodon. Caution: before doing this read the notes below around the downsides to this integration. Doing this is really [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/how-to-add-your-wordpress-blog-to-the-fediverse/">How To: Add Your WordPress Blog to the Fediverse</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This article is based on the <a href="https://fedi.tips/the-fediverse-beyond-mastodon/" target="_blank" rel="noreferrer noopener nofollow">already well-written article on Fedi.Tips</a>.</p>



<p>The idea is to automatically make all your blog posts on WordPress available on the Fediverse that people can follow on their apps such as Mastodon.</p>



<p><strong>Caution: before doing this read the notes below around the downsides to this integration.</strong></p>



<p>Doing this is really easy&#8230;</p>



<ol class="wp-block-list">
<li>Note that this will only work on self-hosted WordPress installations</li>



<li>Note that there&#8217;s very limited configuration options</li>



<li>Install the ActivityPub for WordPress plugin</li>



<li>Activate it</li>



<li>Done &#8211; on the plugin settings page it will give you the username and URL that can be shared for others to follow.  Any new posts will start to appear to all followers.</li>
</ol>



<p><strong>Quick fix: </strong>when I installed the plugin and went to the Health Checks page, it was showing that my author page was not returning valid JSON with the error:</p>



<pre class="wp-block-code"><code>Your author URL https://cubewebsites.com/author/Cube Websites/ does not return valid JSON for application/activity+json. Please check if your hosting supports alternate Accept headers</code></pre>



<p>The reason for this issue was that the author name format in the URL is from an old version of WordPress.  To fix it all you need to do is:</p>



<ol class="wp-block-list">
<li>Connect to your database using a management tool e.g. phpMyAdmin, TablePlus etc</li>



<li>Go to the users table</li>



<li>Find your user account</li>



<li>Change the user_nicename field to a username/slug format i.e. no spaces, lowercase</li>



<li>Save the changes</li>



<li>You&#8217;ll now see that your author page starts to work and the error message goes away</li>
</ol>



<h2 class="wp-block-heading">Why do this?</h2>



<p>I only set this up to test this feature out.  It&#8217;s quite cool but extremely limited as it creates a Fediverse presence for your site with little to no control.  From what I can tell it registers your site domain as a Fediverse server to give you a unique presence.</p>



<p>The following is all missing:</p>



<ul class="wp-block-list">
<li>option to modify a post once it&#8217;s published</li>



<li>specify hashtags to include (very useful on Mastodon)</li>



<li>personalise your profile directly</li>



<li>receive notifications for any engagement with your content i.e. replies and favourites</li>



<li>changing your Fediverse address</li>
</ul>



<p>The Fediverse address, it&#8217;s always @admin@yourdomain.com which isn&#8217;t a particularly appealing good name in this world of vanity usernames.  For profiles it will pick up your profile picture from the user account, so you can modify that.  Perhaps it picks up additional fields from your WordPress user profile but I haven&#8217;t explored that far.</p>



<p>I made a post that I published without setting the category, so the URL includes the &#8216;uncategorized&#8217; slug.  After fixing this mistake, there was no way to go back and change the automatic post it&#8217;s pushed out on the Fediverse feed.</p>



<h2 class="wp-block-heading">Alternative Approaches</h2>



<ol class="wp-block-list">
<li>An easy option is to create a Fediverse account on an existing Mastodon server.  Then connect your blog to push to this account using the API via a plugin, or via the RSS feed</li>



<li>Setup your own Mastodon server so you can use your own server address instead of a general one, and then use that to push the same way as above</li>



<li>Explore Friendica which seems to have the option of making RSS Feeds into Fediverse accounts</li>
</ol>



<p>My preferred option is Option 1, and perhaps at a later date when I have the time to setup my own server, I would migrate the account to that server.  It provides the most control and personalisation and means you can use the Mastodon app to engage with readers.</p>



<p></p>
<p>The post <a href="https://cubewebsites.com/guides/how-to-add-your-wordpress-blog-to-the-fediverse/">How To: Add Your WordPress Blog to the Fediverse</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/how-to-add-your-wordpress-blog-to-the-fediverse/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>FIX: Raspberry PI UPDATE ERROR</title>
		<link>https://cubewebsites.com/technology/fix-raspberry-pi-update-error/</link>
					<comments>https://cubewebsites.com/technology/fix-raspberry-pi-update-error/#comments</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Mon, 18 Oct 2021 12:34:12 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1155</guid>

					<description><![CDATA[<p>When trying to update the packages on the Raspberry Pi, I got the following error: E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. This is because the current stable for Debian is [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/technology/fix-raspberry-pi-update-error/">FIX: Raspberry PI UPDATE ERROR</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>When trying to update the packages on the Raspberry Pi, I got the following error:</p>



<p><code>E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'<br>N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.</code></p>



<p>This is because the current stable for Debian is now Bullseye, and Buster is considered &#8216;oldstable&#8217;<br>To fix the error and continue receiving Buster updates (whilst available) run:</p>



<p><code>apt-get update --allow-releaseinfo-change</code></p>



<p>You may need to run it as sudo</p>



<p>Eventually it will be better to upgrade your Raspbian version to the latest.</p>
<p>The post <a href="https://cubewebsites.com/technology/fix-raspberry-pi-update-error/">FIX: Raspberry PI UPDATE ERROR</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/technology/fix-raspberry-pi-update-error/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Quick Fix: MacOS Mojave Vagrant Error &#8211; tee: /etc/exports: Operation not permitted</title>
		<link>https://cubewebsites.com/software/quick-fix-macos-mojave-vagrant-error-tee-etc-exports-operation-not-permitted/</link>
					<comments>https://cubewebsites.com/software/quick-fix-macos-mojave-vagrant-error-tee-etc-exports-operation-not-permitted/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Tue, 25 Sep 2018 11:47:48 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[vagrant]]></category>
		<category><![CDATA[virtualbox]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=526</guid>

					<description><![CDATA[<p>If you&#8217;ve updated to the newly released MacOS Mojave release then you might find the following issue when starting your vagrant box with NFS mounting: Preparing to edit /etc/exports. Administrator privileges will be required&#8230; Password: tee: /etc/exports: Operation not permitted tee: /etc/exports: Operation not permitted tee: /etc/exports: Operation not permitted You can quickly fix this [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/software/quick-fix-macos-mojave-vagrant-error-tee-etc-exports-operation-not-permitted/">Quick Fix: MacOS Mojave Vagrant Error &#8211; tee: /etc/exports: Operation not permitted</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you&#8217;ve updated to the newly released MacOS Mojave release then you might find the following issue when starting your vagrant box with NFS mounting:</p>
<p>Preparing to edit /etc/exports. Administrator privileges will be required&#8230;</p>
<pre>Password:
tee: /etc/exports: Operation not permitted
tee: /etc/exports: Operation not permitted
tee: /etc/exports: Operation not permitted</pre>
<p>You can quickly fix this issue by following the following steps:</p>
<ol>
<li>Open &#8220;System Preferences&#8221;</li>
<li>Go to &#8220;Security &amp; Privacy&#8221;</li>
<li>Click the &#8220;padlock&#8221; icon in the bottom-left corner where it says &#8220;Click the lock to make changes&#8221; &#8211; enter your password when prompted</li>
<li>On the list of permissions on the left, select &#8220;Full Disk Access&#8221;</li>
<li>Now, on the right-hand side, click the little &#8220;+&#8221; icon</li>
<li>This will open a browse window, use this to select your preferred Terminal e.g. &#8220;Applications &gt; iTerm&#8221; or &#8220;Applications &gt; Utilities &gt; Terminal&#8221;</li>
<li>If the selected Terminal is already open, you&#8217;ll be asked to Quit it &#8211; quit the application and restart it</li>
<li>When you restart the selected application, you may prompted if you&#8217;d like to allow the app to make changes to your computer &#8211; accept and enter your password if required</li>
<li>Try mounting your vagrant machine and now the above error should no longer appear!</li>
</ol>
<p>Note that this is a solution that I have tried and tested, but will be worth keeping an eye out for Vagrant/Virtualbox updates to see if they have an alternative solution.</p>
<p>The post <a href="https://cubewebsites.com/software/quick-fix-macos-mojave-vagrant-error-tee-etc-exports-operation-not-permitted/">Quick Fix: MacOS Mojave Vagrant Error &#8211; tee: /etc/exports: Operation not permitted</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/software/quick-fix-macos-mojave-vagrant-error-tee-etc-exports-operation-not-permitted/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
