There are a few different ways that you can run chromedriver in the background using selenium with ruby on mac osx.
One way is to use the 'nohup' command. This will allow you to run the chromedriver process in the background even if you close your terminal session. To use this, you would first need to start chromedriver from your terminal. Then, you would use the 'nohup' command as follows:
nohup chromedriver &
You can also use the 'screen' command to run chromedriver in the background. This is similar to the 'nohup' command, but it allows you to connect to and disconnect from the running process. This can be useful if you need to kill the process or if you want to check on the process at a later time. To use this, you would first need to start chromedriver from your terminal. Then, you would use the 'screen' command as follows:
screen -S chromedriver
chromedriver
Once you have started chromedriver in the background using one of these methods, you can use selenium with ruby to connect to the running process.