I am using InstantRails in XP SP2. When I try to open a Ruby console
window from InstantRails menu system I only get a Dos window. This is,
probably, a problem in my registry configuration and happens even when I
try to execute a batch (.bat) file.
My question is: how do I run a Ruby Console window without going through
the InstantRails menu system?
If anyone knows how to fix my Window register problem that would work
also.
I am not an expert on Windows, and generally - ruby is painfully slow
in this environment, so you should consider switching to Linux or Mac
OS if you want to use ruby with comfort in long term, but I think I
know what’s your problem.
Seems to me that InstantRails opens console windows for you, and sets
some environmental variables, like PATH to make it possible to use
ruby.
If you type “irb” in normal console window, you’ll get “no such
command” or similiar, while started from menu - will spawn irb for
you.
You might need to navigate to your rails project in command line,
like:
OK. The DOS window that you are getting from the InstantRails menus
IS the Rails Console (almost). A console is just a window, it does
not have to be anything fancy. The special thing about this DOS
window is that it has all the right paths to ruby and your
applications directories pre-set for you so that you don’t have to
worry about them. Another thing that you need to know is that if you
type ruby script/console then you will load your Rails environment for
that particular project and you can interactively issue commands. It
still looks like a DOS window but it has got super powers now!
Hope this helps.
Bharat
I am not an expert on Windows, and generally - ruby is painfully slow
in this environment, so you should consider switching to Linux or Mac
OS if you want to use ruby with comfort in long term, but I think I
know what’s your problem.
Seems to me that InstantRails opens console windows for you, and sets
some environmental variables, like PATH to make it possible to use
ruby.
If you type “irb” in normal console window, you’ll get “no such
command” or similiar, while started from menu - will spawn irb for
you.
You might need to navigate to your rails project in command line,
like:
Both yours and the suggestion from Bharat R. are alternatives to my
broken dos window. InstantRails console window is just the irb window
and I can call that directly. I have since learned how to use the
project script/console for project control.
Thank you both for your response and suggestions.
Best regards,
Lawrence
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.