Forum: Ruby on Rails Ruby console problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2f1546c58ebf1d39b206d104e855e296?d=identicon&s=25 Sal e. Mander (ruby-grok)
on 2008-10-25 23:35
Hi,

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.

Thanks, Lawrence
6bf9328eef0afadd9c9d05334f8dd42b?d=identicon&s=25 Hubert Łępicki (Guest)
on 2008-10-28 19:52
(Received via mailing list)
Hi Lawrence,

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:
> cd C:\myprojects\rails\blog

and run console:

> ruby script\console

Please let me know if this helps,
Hubert

On 25 Pa¼, 22:35, "Sal e. Mander" <rails-mailing-l...@andreas-s.net>
D3fc5887a2f39f2e0c8989d39ce5e6f9?d=identicon&s=25 Bharat Ruparel (bruparel)
on 2008-10-29 15:13
(Received via mailing list)
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

On Oct 25, 5:35 pm, "Sal e. Mander" <rails-mailing-l...@andreas-s.net>
2f1546c58ebf1d39b206d104e855e296?d=identicon&s=25 Sal e. Mander (ruby-grok)
on 2008-11-18 06:43
Hubert Łępicki wrote:
> Hi Lawrence,
>
> 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:
>> cd C:\myprojects\rails\blog
>
> and run console:
>
>> ruby script\console
>
> Please let me know if this helps,
> Hubert
>
> On 25 Pa�, 22:35, "Sal e. Mander" <rails-mailing-l...@andreas-s.net>

Both yours and the suggestion from Bharat Ruparel 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 topic is locked and can not be replied to.