Mac OS 10.15.7 on a specced out 16" 2019 Macbook Pro
---
ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: parallels
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Repositories
to: /home/vagrant/LocalRepositories
sites:
- map: october.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Core/october/public"
- map: iacea.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/iacea.com/public"
- map: bbkeng.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/bbkeng.ca/public"
- map: donate.shrmsk.local
to: "/home/vagrant/LocalRepositories/Laravel/shrm-donations/public"
- map: luketowers.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/luketowers.ca/public"
- map: cadetflying.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/cadetflying.site/public"
- map: moosejaw.cadetflying.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/cadetflying.site/public"
- map: westridge.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/westridge.ca/public"
- map: cityofroseburg.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/cityofroseburg.org/public"
- map: shrmsk.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/shrmsk.com/public"
- map: garagesales.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/garagesales.guide/public"
- map: reportneedles.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/reportneedles.ca/public"
- map: october-news.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/october-news.com/public"
- map: 34aircadets.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/34aircadets.ca/public"
- map: michaeltowers.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/michaeltowers.ca/public"
- map: install-october.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Core/install"
- map: squireassociates.local
to: "/home/vagrant/LocalRepositories/OctoberCMS/Sites/squireassociates.net"
databases:
- homestead
features:
- mariadb: true
- ohmyzsh: false
- webdriver: true
ports:
- send: 23517
to: 23517
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
https://gist.github.com/LukeTowers/8e053ba85cf0c0e795afc5b93c3aa622
When calling ray($var) from my application, debug output should be sent to Ray.
The connection to the host machine is unable to be established.
Using the following ray.php config file on an October CMS instance (v1.1.develop) and putting dd($curlError) in the send() method of spatie/ray/Client results in the message "Connection timed out after 2002 milliseconds". Any other IP, including localhost with port forwarding (which appears to be only available in the direction of forwarding a port on the VM to the host, not the other way round), results in the message "Failed to connect to 10.211.55.1 port 23517: Connection refused". (that IP was pulled by using the answer from https://stackoverflow.com/a/44873282/6652884 to try and see if the host machine IP was different from the recommended default.
<?php return [
/*
* This settings controls whether data should be sent to Ray.
*
* By default, `ray()` will only transmit data in non-production environments.
*/
'enable' => env('RAY_ENABLED', true),
/*
* When enabled, all things logged to the application log
* will be sent to Ray as well.
*/
'send_log_calls_to_ray' => env('SEND_LOG_CALLS_TO_RAY', false),
/*
* When enabled, all things passed to `dump` or `dd`
* will be sent to Ray as well.
*/
'send_dumps_to_ray' => env('SEND_DUMPS_TO_RAY', false),
/*
* The host used to communicate with the Ray app.
* For usage in Docker on Mac or Windows, you can replace host with 'host.docker.internal'
* For usage in Homestead on Mac or Windows, you can replace host with '10.0.2.2'
*/
'host' => env('RAY_HOST', '10.0.2.2'), //'localhost'),
/*
* The port number used to communicate with the Ray app.
*/
'port' => env('RAY_PORT', 23517),
/*
* Absolute base path for your sites or projects in Homestead,
* Vagrant, Docker, or another remote development server.
*/
'remote_path' => env('RAY_REMOTE_PATH', '/home/vagrant/LocalRepositories/'),
/*
* Absolute base path for your sites or projects on your local
* computer where your IDE or code editor is running on.
*/
'local_path' => env('RAY_LOCAL_PATH', '/Users/luketowers/Repositories'),
/*
* When this setting is enabled, the package will not try to format values sent to Ray.
*/
'always_send_raw_values' => false,
];
composer create-project october/october. php artisan create:plugin Test.Raycomposer update from the plugin's folder:{
"require": {
"spatie/laravel-ray": "^1.9"
},
"replace": {
"illuminate/contracts": "7.20",
"illuminate/database": "7.20",
"illuminate/queue": "7.20",
"illuminate/support": "7.20"
}
}
use Composer\InstalledVersions;
class Plugin extends PluginBase
{
public $elevated = true;
/**
* Boot method, called right before the request route.
*
* @return array
*/
public function boot()
{
// Register the service providers provided by the packages used by your plugin
\App::register(\Spatie\LaravelRay\RayServiceProvider::class);
// Handle the requirements being installed in a plugin specific vendor directory
// and then included by October instead of by composer when using Composer 2
$localInstalled = __DIR__ . '/vendor/composer/installed.php';
if (class_exists(InstalledVersions::class) && file_exists($localInstalled)) {
$installed = InstalledVersions::getRawData();
$extraInstalled = require $localInstalled;
$installed['versions'] = array_merge($extraInstalled['versions'], $installed['versions']);
InstalledVersions::reload($installed);
}
ray('test');
}
TestResponse macro in spatie/laravel-ray (this is just to get this package working with Laravel 6, the final production version of this plugin will just replicate the package entirely and make the necessary changes. ray.php file above into your project rootdd($curlError) in the if ($curlError) conditional of the send() method of the spatie/ray/Client class to see the error message reported by Curl.Possibly https://github.com/spatie/ray/issues/38. From reading a bunch of issues where people have problems with this it's starting to seem like it's an issue specific to using Parallels as a provider, I'm thinking that might be the case specifically because it seems like everyone else is receiving the 10.0.2.2 IP when they run the command to find the host machine's IP and I am not.
@freekmurze do you have any ideas as to what could be going on here? Would really like to give Ray a try, but haven't had any luck so far and I've spent pretty much the entire day screwing around with this trying to get it to work.
Hi,
I'm not a homestead user, so I can't offer any more details as what other have already shared on the subject.
https://spatie.be/docs/ray/v1/environment-specific-configuration/homestead
Hi @freekmurze 馃憢 I just opened https://github.com/spatie/ray/issues/258 which will help me sort this issue out.
@svpernova09 I just tried 10.211.55.2 as the host on my parallels box and it's working fine now. Looks like that was the issue! https://forum.parallels.com/threads/accessing-localhost.258362/#post-828246
Glad you got it working!
Thanks for your help!
Most helpful comment
@svpernova09 I just tried
10.211.55.2as the host on my parallels box and it's working fine now. Looks like that was the issue! https://forum.parallels.com/threads/accessing-localhost.258362/#post-828246