0

I want to create a batch file which can run a Ruby file like test.rb.

Anyone have any idea how to create one?

Im using Ruby 2.0.0 and Windows 10.

tadman
  • 208,517
  • 23
  • 234
  • 262
Ali H
  • 11
  • 1
  • 5
  • [you can check this](http://stackoverflow.com/questions/35094778/is-it-possible-to-embed-a-ruby-code-into-batch-file) though the only thing you need is to use `ruby c:\test.rb` – npocmaka Jun 09 '16 at 11:58
  • 1
    Welcome to Stack Overflow. Your question seems premature. We'd like to see your effort toward solving this, and, if it didn't work we'll help you get it working. Please read "[ask]" including the linked pages, and "[mcve]". – the Tin Man Jun 09 '16 at 18:10

1 Answers1

0

You just need to do this.

cd location
test.rb

This might also work.

cd ruby_install_location
ruby.exe c:/fullpath/test.rb
Rishav
  • 3,818
  • 1
  • 31
  • 49