0

I'm trying to run a ruby gem command called wayback-machine-downloader from R using the shell command:

shell(ruby_call)

but I get the following error messages:

'wayback_machine_downloader' is not recognized as an internal or external command, operable program or batch file.

Warning messages:

1: running command 'C:\WINDOWS\system32\cmd.exe /c wayback_machine_downloader https://undergroundreptiles.com/ --directory C:/Users/oliver/websites/underground_19981212033710 --from 19981212033710 --concurrency 200' had status 1

2: In shell(ruby_call) : 'wayback_machine_downloader https://undergroundreptiles.com/ --directory C:/Users/oliver/websites/underground_19981212033710 --from 19981212033710 --concurrency 200' execution failed with error code 1`

When I run the exact same code directly from the command line it runs perfectly. Is there some setting I need to change in R/RStudio?

I also tried the system command, but that doesn't work either:

system(ruby_call)

Warning message:

running command 'wayback_machine_downloader https://undergroundreptiles.com/ --directory C:/Users/oliver/websites/underground_19981212033710 --from 19981212033710 --concurrency 200' had status 127 `

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160
Oliver Oliver
  • 2,057
  • 4
  • 16
  • 14

1 Answers1

0

adding ruby to path before running will fix it:

set PATH=C:/RailsInstaller/Ruby2.3.0/bin;%PATH%

How do I add Ruby to the PATH variable on Windows?

Community
  • 1
  • 1
Oliver Oliver
  • 2,057
  • 4
  • 16
  • 14