Error starting Rails console within Rubymine 2.0.1

When I attempt to start the Rails console from within Rubymine 2.0.1, I'm seeing the following error message:

C:\Program Files\BitNami RubyStack\ruby\bin\ruby.exe -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) C:/Documents and Settings/ctaylor/BitNami RubyStack projects/newdazzle/script/console --irb=C:/Program Files/BitNami RubyStack/ruby/bin/irb.bat
Loading development environment (Rails 2.3.5)
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.

Also, I verified that the following commands worked from the DOS command shell: irb, ruby, and gem.

Thanks in advance,


Hi Conrad,

there are actually two problems with running rails console from RubyMine. Both of them are related to the whitespace in the path. We pass additional option --irb to ensure that right ruby will be used (see The problem on our side is that we forget to quote the path. I've fixed it and fix will be available in 2.0.2. The other is that Rails also forgets to quote irb if it has whitespaces. May be they'll fix it (in Rails 3.0 it is done other way), but you need it working with your current version, so you can apply small quickfix:

1. open lib/commands/console.rb in your rails gem.
2. replace last line (exec "#{options[:irb]} #{libs} --simple-prompt") with exec "\"#{options[:irb]}\" #{libs} --simple-prompt"


Please sign in to leave a comment.