My code was not working on rubymines but working fine on cmd?

Possibly I find there is issue with ide(rubymines) or the debugger.
Some thread of the program get terminated and the program skipped some
lines silently due to some begin-rescue statement and error, now running
the same script on cmd works well. any idea?

Unless you show us your code and the point where the error happens,
there’s very little we can do.