I've just run a simple test ...
if (n == 1) then return 1
else return fac(n-1)*n
while n > 0
n = n - 1
t1 = Time.new
t2 = Time.new
puts t2 - t1
If I run this from the IDE with no debugging, I get about 6 seconds - and about the same from the command line. If I run it with the debugger I get 14 seconds.
Can you try the same code with a crean project?
There is no difference between running Ruby from VS with no debugging and from a command line. VS runs Ruby from a command line anyway: it creates a process and runs cmd.exe which then runs Ruby.