Help to run Ruby

I am on windows XP.

Ruby.exe is in directory "bin":
E:\Ruby\bin

script is in directory "embed":

E:\Ruby\myprogram-beta1\sources\scripts\embed

how to run script which is in embed dir?

thanks

balzer wrote:

I am on windows XP.

Ruby.exe is in directory "bin":
E:\Ruby\bin

script is in directory "embed":

E:\Ruby\myprogram-beta1\sources\scripts\embed

how to run script which is in embed dir?

thanks

1) Either double-click on the script you want to run, OR
2) Open a command window, change directories to where the script is
located, and type 'ruby scriptname.rb'

···

--
Posted via http://www.ruby-forum.com/\.

E:\Ruby\bin\ruby.exe E:\Ruby\myprogram-beta1\sources\scripts\embed

Or preferable you add Ruby\bin to your PATH:

SET PATH=%PATH%;E:\Ruby\bin

And then you can invoke "ruby embed" directly from inside the scripts
folder.

HTH,

···

On May 11, 6:55 am, "balzer" <nos...@news.eternal-september.org> wrote:

I am on windows XP.

Ruby.exe is in directory "bin":
E:\Ruby\bin

script is in directory "embed":

E:\Ruby\myprogram-beta1\sources\scripts\embed

how to run script which is in embed dir?

--
Luis Lavena

Output from PATH - does this imply that I have the Path issue sorted?

···

--
Posted via http://www.ruby-forum.com/.

"Luis Lavena" <luislavena@gmail.com> wrote in message news:d6232bc8-39ab-4f25-8b77-e33f9300a241@i9g2000yqi.googlegroups.com...

···

On May 11, 6:55 am, "balzer" <nos...@news.eternal-september.org> wrote:

I am on windows XP.

Ruby.exe is in directory "bin":
E:\Ruby\bin

script is in directory "embed":

E:\Ruby\myprogram-beta1\sources\scripts\embed

how to run script which is in embed dir?

E:\Ruby\bin\ruby.exe E:\Ruby\myprogram-beta1\sources\scripts\embed

Or preferable you add Ruby\bin to your PATH:

SET PATH=%PATH%;E:\Ruby\bin

And then you can invoke "ruby embed" directly from inside the scripts
folder.

HTH,
--
Luis Lavena
------------

to add Ruby\bin to your PATH with:

SET PATH=%PATH%;E:\Ruby\bin

or

SET PATH=%PATH%;E:\Ruby\bin\ruby.exe

To invoke command directly from inside the scripts folder, should I directly run MS-DOS command ruby.exe embed.rb
C:\Documents and Settings\User> ruby.exe embed.rb
or or first change directory from default windows to
E:\> ruby.exe embed.rb ?

THANKS.

BTW: If you use 4nt from jpsoft, which is a cmd.exe replacement,
you can do the following:

set PATH=E:\Ruby\bin;E:\Ruby\myprogram-beta1\sources\scripts\embed;%PATH%
set .rb=ruby.exe

The last one says, treat ruby scripts as executables through ruby.exe.

lets say, your script is myprog.rb then you can call it like this:

C:> myprog

But if the path to your prog only contains one ruby script worth starting
directly, it does not make much sense to put its directory into PATH.
Then you could setup an alias to achieve the same:

alias myprog=E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb

get 4nt. jpsoft has a free version and it is really worth testing. On
windows I use it for years.

4nt has a file 4start.btm (or so) where you can put such settings in.
Then when you start 4nt, everything is setup automatically. Another nice
thing about 4nt: It comes with an installer, but you can take the 4nt-
directory and move it somewhere else, eg. onto an usb-stick. This way I
run a full sack of software: ruby, perl, python, java, php, mysql,
apache, firefox, thunderbird, openoffice and another 50-100 open source
software packages.

But if you want to stick with cmd.exe, you could do it this way:

make a bin-folder lets say in E:\bin and put it into PATH

set PATH=E:\Ruby\bin;E:\bin;%PATH

Then but a bat-file into E:\bin with the name of your prog, myprog.bat:

--- snip ---
@echo off
setlocal
ruby E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb %*
--- snip ---

%* passes all the arguments you give to the bat-file to your ruby script.

now you can call your prog

C:> myprog

Thomas

Luis Lavena wrote in post #911385:

···

On May 11, 6:55 am, "balzer" <nos...@news.eternal-september.org> > wrote:

E:\Ruby\bin\ruby.exe E:\Ruby\myprogram-beta1\sources\scripts\embed

Or preferable you add Ruby\bin to your PATH:

SET PATH=%PATH%;E:\Ruby\bin

And then you can invoke "ruby embed" directly from inside the scripts
folder.

HTH,

I am having issues - which I think relate to the PATH. I have done the
following:

SET PATH=%PATH%:C:\ruby192\bin

I have enclosed screen shot showing what happens when I try to generate
controller

--
Posted via http://www.ruby-forum.com/\.

to add Ruby\bin to your PATH with:

SET PATH=%PATH%;E:\Ruby\bin

or

SET PATH=%PATH%;E:\Ruby\bin\ruby.exe

No, you add directories, not executables.

To invoke command directly from inside the scripts folder, should I
directly run MS-DOS command ruby.exe embed.rb
C:\Documents and Settings\User> ruby.exe embed.rb
or or first change directory from default windows to
E:\> ruby.exe embed.rb ?

You change (cd) into the directory that contains your scripts,
whatever.

Since Ruby's bin directory is in the search path, invoking "ruby" is
enough to locate it properly.

···

On May 11, 2:12 pm, "balzer" <nos...@news.eternal-september.org> wrote:

--
Luis Lavena

"Thomas Volkmar Worm" <tvw@s4r.de> wrote in message news:850qlfFd63U1@mid.uni-berlin.de...

···

BTW: If you use 4nt from jpsoft, which is a cmd.exe replacement,
you can do the following:

set PATH=E:\Ruby\bin;E:\Ruby\myprogram-beta1\sources\scripts\embed;%PATH%
set .rb=ruby.exe

The last one says, treat ruby scripts as executables through ruby.exe.

lets say, your script is myprog.rb then you can call it like this:

C:> myprog

But if the path to your prog only contains one ruby script worth starting
directly, it does not make much sense to put its directory into PATH.
Then you could setup an alias to achieve the same:

alias myprog=E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb

get 4nt. jpsoft has a free version and it is really worth testing. On
windows I use it for years.

4nt has a file 4start.btm (or so) where you can put such settings in.
Then when you start 4nt, everything is setup automatically. Another nice
thing about 4nt: It comes with an installer, but you can take the 4nt-
directory and move it somewhere else, eg. onto an usb-stick. This way I
run a full sack of software: ruby, perl, python, java, php, mysql,
apache, firefox, thunderbird, openoffice and another 50-100 open source
software packages.

But if you want to stick with cmd.exe, you could do it this way:

make a bin-folder lets say in E:\bin and put it into PATH

set PATH=E:\Ruby\bin;E:\bin;%PATH

Then but a bat-file into E:\bin with the name of your prog, myprog.bat:

--- snip ---
@echo off
setlocal
ruby E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb %*
--- snip ---

%* passes all the arguments you give to the bat-file to your ruby script.

now you can call your prog

C:> myprog

Thomas

---------------------
I use Ruby without installer, ruby-1.8.7-p72-i386-mswin32
Just tried to run script , but got error: "The application has failed to start because SSLEAY32.dll was not found. Reinstalling the application may fix this problem."
Here is part of output printed in DOS window:

e:/ruby/lib/ruby/1.8/i386-mswin32/openssl.so: 126: The specified module could no
t be found. - e:/ruby/lib/ruby/1.8/i386-mswin32/openssl.so (LoadError)
        from e:/ruby/lib/ruby/1.8/openssl.rb:17
        from ../../parser/signature.rb:22:in `require'
        from ../../parser/signature.rb:22
        from ../../parser/pdf.rb:47:in `require'
        from ../../parser/pdf.rb:47
        from ../../parser/parser.rb:24:in `require'
        from ../../parser/parser.rb:24
        from embed.rb:5:in `require'
        from embed.rb:5

Thank you.

Using the mswin32 downloads form ruby-lang requires you additional
instructions, as noted in the ruby-lang download page:

http://www.ruby-lang.org/en/downloads/

"Please note that some of the above binaries will require manual
download and installation of additional components detailed on this
page. Please ensure you’ve followed/performed these steps prior
reporting a bug."

And if you keep reading:

"The RubyInstaller does not require these additional tasks."

The RubyInstaller binaries are here:

···

On May 13, 8:31 am, "balzer" <nos...@news.eternal-september.org> wrote:

"Thomas Volkmar Worm" <t...@s4r.de> wrote in messagenews:850qlfFd63U1@mid.uni-berlin.de...

> BTW: If you use 4nt from jpsoft, which is a cmd.exe replacement,
> you can do the following:

> set PATH=E:\Ruby\bin;E:\Ruby\myprogram-beta1\sources\scripts\embed;%PATH%
> set .rb=ruby.exe

> The last one says, treat ruby scripts as executables through ruby.exe.

> lets say, your script is myprog.rb then you can call it like this:

> C:> myprog

> But if the path to your prog only contains one ruby script worth starting
> directly, it does not make much sense to put its directory into PATH.
> Then you could setup an alias to achieve the same:

> alias myprog=E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb

> get 4nt. jpsoft has a free version and it is really worth testing. On
> windows I use it for years.

> 4nt has a file 4start.btm (or so) where you can put such settings in.
> Then when you start 4nt, everything is setup automatically. Another nice
> thing about 4nt: It comes with an installer, but you can take the 4nt-
> directory and move it somewhere else, eg. onto an usb-stick. This way I
> run a full sack of software: ruby, perl, python, java, php, mysql,
> apache, firefox, thunderbird, openoffice and another 50-100 open source
> software packages.

> But if you want to stick with cmd.exe, you could do it this way:

> make a bin-folder lets say in E:\bin and put it into PATH

> set PATH=E:\Ruby\bin;E:\bin;%PATH

> Then but a bat-file into E:\bin with the name of your prog, myprog.bat:

> --- snip ---
> @echo off
> setlocal
> ruby E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb %*
> --- snip ---

> %* passes all the arguments you give to the bat-file to your ruby script.

> now you can call your prog

> C:> myprog

> Thomas

---------------------
I use Ruby without installer, ruby-1.8.7-p72-i386-mswin32
Just tried to run script , but got error: "The application has failed to
start because SSLEAY32.dll was not found. Reinstalling the application may
fix this problem."
Here is part of output printed in DOS window:

--
Luis Lavena

"Luis Lavena" <luislavena@gmail.com> wrote in message news:ef8f33e9-8208-4f7e-9b60-d339b2450159@d27g2000yqc.googlegroups.com...

"Thomas Volkmar Worm" <t...@s4r.de> wrote in messagenews:850qlfFd63U1@mid.uni-berlin.de...

> BTW: If you use 4nt from jpsoft, which is a cmd.exe replacement,
> you can do the following:

> set > PATH=E:\Ruby\bin;E:\Ruby\myprogram-beta1\sources\scripts\embed;%PATH%
> set .rb=ruby.exe

> The last one says, treat ruby scripts as executables through ruby.exe.

> lets say, your script is myprog.rb then you can call it like this:

> C:> myprog

> But if the path to your prog only contains one ruby script worth > starting
> directly, it does not make much sense to put its directory into PATH.
> Then you could setup an alias to achieve the same:

> alias myprog=E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb

> get 4nt. jpsoft has a free version and it is really worth testing. On
> windows I use it for years.

> 4nt has a file 4start.btm (or so) where you can put such settings in.
> Then when you start 4nt, everything is setup automatically. Another nice
> thing about 4nt: It comes with an installer, but you can take the 4nt-
> directory and move it somewhere else, eg. onto an usb-stick. This way I
> run a full sack of software: ruby, perl, python, java, php, mysql,
> apache, firefox, thunderbird, openoffice and another 50-100 open source
> software packages.

> But if you want to stick with cmd.exe, you could do it this way:

> make a bin-folder lets say in E:\bin and put it into PATH

> set PATH=E:\Ruby\bin;E:\bin;%PATH

> Then but a bat-file into E:\bin with the name of your prog, myprog.bat:

> --- snip ---
> @echo off
> setlocal
> ruby E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb %*
> --- snip ---

> %* passes all the arguments you give to the bat-file to your ruby > script.

> now you can call your prog

> C:> myprog

> Thomas

---------------------
I use Ruby without installer, ruby-1.8.7-p72-i386-mswin32
Just tried to run script , but got error: "The application has failed to
start because SSLEAY32.dll was not found. Reinstalling the application may
fix this problem."
Here is part of output printed in DOS window:

Using the mswin32 downloads form ruby-lang requires you additional
instructions, as noted in the ruby-lang download page:

http://www.ruby-lang.org/en/downloads/

"Please note that some of the above binaries will require manual
download and installation of additional components detailed on this
page. Please ensure you’ve followed/performed these steps prior
reporting a bug."

And if you keep reading:

"The RubyInstaller does not require these additional tasks."

The RubyInstaller binaries are here:

···

On May 13, 8:31 am, "balzer" <nos...@news.eternal-september.org> wrote:

--
Luis Lavena
----------

Does the RubyInstaller install some libraries into Windows system directory? Does it use Registry or config file to store program settings? Does it install Cygwin?

You have two versions: with Installer or extractable packages (7-Zip)

The Installer version offer to register as default executing option
for .rb files and also allow you add Ruby to the search path. This
option is not portable.

The 7-Zip package is portable, extract on any directory, add the bin
directory to the PATH (as explained before) and call scripts with
"ruby myscript.rb"

Is not Cygwin nor install it.

···

On May 13, 9:05 am, "balzer" <nos...@news.eternal-september.org> wrote:

----------

Does the RubyInstaller install some libraries into Windows system directory?
Does it use Registry or config file to store program settings? Does it
install Cygwin?

--
Luis Lavena