Can't open new ruby program under "new" context menu

I’m stuck on the new version at trying to do something very simple.
When I try to click “new” context menu in windows to open a new ruby
program, there is no option to open a new ruby program. Has anybody
else had this problem and know how to fix it? This is my first outing
into programming of any kind so please explain it to me like I’m a
little kid.

I do not understand what you are trying to click and create in Windows,
so allow me to start from a beginning for you. I actually use a Unix
type environment, but I found this information through Ruby’s main site.

This looks like a good place to start to get you setup in Windows:

http://www.public.marcric.com/installingruby.html

It appears to walk you through downloading and installing Ruby on
Windows, plus it includes steps on installing an appropriate editor,
SciTE, to help you create Ruby programs. As long as you are familar
with creating and using files in Windows, you should be ok.

Of course, Ruby’s main site,

http://www.ruby-lang.org

…is also a good place to start. To the right, under “Get Started,
it’s easy!”, you can sample using Ruby from your own browser.

Hope this helps!

I just uninstalled what I had and reinstalled using the steps given in
the link you sent, but for some reason I still can’t do what I’m trying
to do. If you have any familiarity with Windows at all, I’ll try to
explain what I’m attempting to do. On windows, when you right click on
the desktop or in a folder, one of the options you can click on says
“new”. From this you can choose a new folder, word document, etc. I’m
trying to make the “new” menu have an option to add a new Ruby P.,
because the Ruby Tutorial I’m reading by Chris P. says that’s the next
step. According to his book, the option should be under the “new” menu
already.

Lee V. wrote in post #1090514:

I just uninstalled what I had and reinstalled using the steps given in
the link you sent, but for some reason I still can’t do what I’m trying
to do. If you have any familiarity with Windows at all, I’ll try to
explain what I’m attempting to do. On windows, when you right click on
the desktop or in a folder, one of the options you can click on says
“new”. From this you can choose a new folder, word document, etc. I’m
trying to make the “new” menu have an option to add a new Ruby P.,
because the Ruby Tutorial I’m reading by Chris P. says that’s the next
step. According to his book, the option should be under the “new” menu
already.

I am very familiar with Windows, so I do understand right-clicking the
desktop and being presented with a menu. As you have seen by the types
of “new” items you can create by that menu, maybe when you install SciTE
(the Scintilla Text Editor), it might add that option to the “new” menu.

Otherwise, if you already have that editor installed, it would probably
be just easier to open the editor and use its “Save as…” (assuming it
has that functionality) to save whatever Ruby file you create in SciTE
to any location you choose.

Since you know how to right-click and choose “new” on the desktop, how
about creating a folder on the Desktop called “My Ruby Files”, or
something, and you can use that as you location to store files. Just a
thought, but I think just jumping into the editor and following along
with Chris P.'s tutorial will get you going along just fine.

Have fun with Ruby, I know I am!

I just uninstalled what I had and reinstalled using the steps given in
the link you sent, but for some reason I still can’t do what I’m trying
to do. If you have any familiarity with Windows at all, I’ll try to
explain what I’m attempting to do. On windows, when you right click on
the desktop or in a folder, one of the options you can click on says
“new”. From this you can choose a new folder, word document, etc. I’m
trying to make the “new” menu have an option to add a new Ruby P.,
because the Ruby Tutorial I’m reading by Chris P. says that’s the next
step. According to his book, the option should be under the “new” menu
already.


From: Derrick B. [email protected]
To: ruby-talk ML [email protected]
Sent: Friday, December 28, 2012 1:56 PM
Subject: Re: can’t open new ruby program under “new” context menu

I do not understand what you are trying to click and create in Windows,
so allow me to start from a beginning for you. I actually use a Unix
type environment, but I found this information through Ruby’s main site.

This looks like a good place to start to get you setup in Windows:

http://www.public.marcric.com/installingruby.html

It appears to walk you through downloading and installing Ruby on
Windows, plus it includes steps on installing an appropriate editor,
SciTE, to help you create Ruby programs. As long as you are familar
with creating and using files in Windows, you should be ok.

Of course, Ruby’s main site,

http://www.ruby-lang.org

…is also a good place to start. To the right, under “Get Started,
it’s easy!”, you can sample using Ruby from your own browser.

Hope this helps!

Well, I’m up to page 43 in Chris P.'s book and having a lot of fun,
but I still can’t figure out two basic things. One is what I’ve already
asked you about. I’m just going to paste what his book says so you can
see what I’m having trouble with:

Now let’s make a folder on your desktop in which you’ll keep all of your
programs. Right-click your desktop, select New, and then select Folder.
Name it something truly memorable, such as programs. Now doubleclick
the folder to open it.
To make a blank Ruby program, right-click in the folder, select New,
and then select Ruby P… You can rename the file if you want,
but make sure to keep the .rb file extension, since that’s what tells
your
computer this is a Ruby program (and not an email or a picture of Mr.
Bean or something).

I have a feeling creating the folder will be important down the road but
I just can’t figure out how to do it. Is my problem that I shouldn’t be
using ‘interactive ruby’? That’s what I’ve been using for everything,
which brings me to my second question; I don’t know how to make more
than one line of a program at a time. Whenever I type a line of program
and press enter, I get the response. I know there’s got to be a way to
fix this. I even tried typing lines at a time in the editor and then
pasting it into interactive ruby, but it still only reads one line at a
time. Please help! I’m understanding all the programming I’m doing but
these 2 basic, setup things, are driving me crazy!


From: Derrick B. [email protected]
To: ruby-talk ML [email protected]
Sent: Saturday, December 29, 2012 1:11 PM
Subject: Re: can’t open new ruby program under “new” context menu

Lee V. wrote in post #1090514:

I just uninstalled what I had and reinstalled using the steps given in
the link you sent, but for some reason I still can’t do what I’m trying
to do. If you have any familiarity with Windows at all, I’ll try to
explain what I’m attempting to do. On windows, when you right click on
the desktop or in a folder, one of the options you can click on says
“new”. From this you can choose a new folder, word document, etc. I’m
trying to make the “new” menu have an option to add a new Ruby P.,
because the Ruby Tutorial I’m reading by Chris P. says that’s the next
step. According to his book, the option should be under the “new” menu
already.

I am very familiar with Windows, so I do understand right-clicking the
desktop and being presented with a menu. As you have seen by the types
of “new” items you can create by that menu, maybe when you install SciTE
(the Scintilla Text Editor), it might add that option to the “new” menu.

Otherwise, if you already have that editor installed, it would probably
be just easier to open the editor and use its “Save as…” (assuming it
has that functionality) to save whatever Ruby file you create in SciTE
to any location you choose.

Since you know how to right-click and choose “new” on the desktop, how
about creating a folder on the Desktop called “My Ruby Files”, or
something, and you can use that as you location to store files. Just a
thought, but I think just jumping into the editor and following along
with Chris P.'s tutorial will get you going along just fine.

Have fun with Ruby, I know I am!

Lee V. wrote in post #1090637:

Well, I’m up to page 43 in Chris P.'s book and having a lot of fun,
but I still can’t figure out two basic things. One is what I’ve already
asked you about. I’m just going to paste what his book says so you can
see what I’m having trouble with:

Now let’s make a folder on your desktop in which you’ll keep all of your
programs. Right-click your desktop, select New, and then select Folder.
Name it something truly memorable, such as programs. Now doubleclick
the folder to open it.
To make a blank Ruby program, right-click in the folder, select New,
and then select Ruby P… You can rename the file if you want,
but make sure to keep the .rb file extension, since that’s what tells
your
computer this is a Ruby program (and not an email or a picture of Mr.
Bean or something).

I have a feeling creating the folder will be important down the road but
I just can’t figure out how to do it. Is my problem that I shouldn’t be
using ‘interactive ruby’? That’s what I’ve been using for everything,
which brings me to my second question; I don’t know how to make more
than one line of a program at a time. Whenever I type a line of program
and press enter, I get the response. I know there’s got to be a way to
fix this. I even tried typing lines at a time in the editor and then
pasting it into interactive ruby, but it still only reads one line at a
time. Please help! I’m understanding all the programming I’m doing but
these 2 basic, setup things, are driving me crazy!

Ey my friend! don’t be crazy. I was in the same foots like you a year
ago. You have to know a few things: what Pine calls a ‘Ruby P.m’ is
a just a *.txt file, with the extension changed to *.rb. There, in a any
text file you can make a programm. Any IDE(Integrated Development
Environment) what does is just help you to write a text file, which will
become your programm, it puts color on strings and colors on variables
because it’s more easy for you to see the code, to read the code, but
still is a text file with utf-8 characters in the most cases. How do you
can execute your programms? (text files… remember), you have to open
the console, I mean cmd, and then put:

ruby ‘C:/RubyPrograms/MyFirstProgram/source_code.rb’

Something like that, you have to put ruby and then the full path.
There’s many things that you have to know but start with this. This way
you can run all the programms you want. I will recommend you a very
light IDE to start, just for strat: InType. Is very basic, then once you
domine some skills, switch to AptanaStudio3, it is free. Best for me is
RubyMine but you have to buy it, is not free. AptanaStudio3 does it
good.
Hope this help you, don’t be afraid to ask. Have fun!

Lee V. wrote in post #1090674:

Thank you! I downloaded Intype and everything makes sense now. I can
write multi line programs, save them, and view the result in ruby now!
Well, there’s a little problem, actually. When I go to open the file,
the ruby screen will appear for a fraction of a second and then close.
It did this for 3 out of the 4 programs I saved. Is this a glitch that
has an easy fix?

Is not a trouble, see… most of the programms will run and shut it down
by themself, that’s why you see a window popping up and closing
instantly. If you want to see some prints or any result you have to
sleep the programm, from time to time, to see what’s happening, like
this

puts “Hello there…”
sleep(3)
puts “How are you?..”
sleep(2)
puts “Sorry I’m bussy! Goodbye!”
sleep(1)

…sleep is a method, don’t be afraid to use the documentation. Other
way is execute it from the console, what you want to do 99% of the time,
I’ve told you that before. WindowsKey + R, type “cmd”, press Enter,
there you have to put:

ruby ‘C:/RubyPrograms/MyFirstProgram/source_code.rb’

…play with that. You’re next step is to be familiarized with cmd, will
help you a lot. Instead of put the full path you can do this in cmd

pwd
#=>C:\Users\You
cd …/
#=>C:\Users
cd …/
#=>C:
cd RubyPrograms
#=>C:\RubyPrograms
cd MyFirstProgram
#=>C:\RubyPrograms\MyFirstProgram
ruby source_code.rb

…the effect is the same that if you put the full path, you’ll be more
confortably in the last way with time…

By the way, if you don’t mind me asking, what is your
job title? I want to learn programming so I can get a job in it, but
aside from a job with the word programmer in the title, I don’t know
what kind of jobs are out there. Basically, what can I do with this for
a job?

Good question, my title is: none. You don’t need a word for the
beautifull things you can create, you don’t need a paper to be a good
programmer, nobody can say that you are a bad programmer if you make
complex and big programms and if you know that you are. I’m a starter
like you, just with a year more of studies than you, I’ve read Pine’s
book too. I’ve beeing in RubyConf of my country this year, there I meet
very smart and nice people, you can learn a lot from those places. I
work alone, this days I’m making my first payed programm to an
enterprise, where I work too that has nothing to do with programming,
I’ve presented a proyect to bring order to the enterprise, that today is
a messy, so its like an especific programm. That is a way: work alone;
the other is in a software development enterprise like Neo, haha! look
that’s a good comparison, first way you’ll be a nocturnal Neo ^^,
sencond way you’ll be a morning Neo with good jackets and all those
stuff lol ^^. Seriously, I don’t know how it is working for a boss in
programming, meaby another has to respond that.

Thank you! I downloaded Intype and everything makes sense now. I can
write multi line programs, save them, and view the result in ruby now!
Well, there’s a little problem, actually. When I go to open the file,
the ruby screen will appear for a fraction of a second and then close.
It did this for 3 out of the 4 programs I saved. Is this a glitch that
has an easy fix? By the way, if you don’t mind me asking, what is your
job title? I want to learn programming so I can get a job in it, but
aside from a job with the word programmer in the title, I don’t know
what kind of jobs are out there. Basically, what can I do with this for
a job?


From: Damián M. González [email protected]
To: ruby-talk ML [email protected]
Sent: Sunday, December 30, 2012 7:54 AM
Subject: Re: can’t open new ruby program under “new” context menu

Lee V. wrote in post #1090637:

and then select Ruby P… You can rename the file if you want,
than one line of a program at a time. Whenever I type a line of program
and press enter, I get the response. I know there’s got to be a way to
fix this. I even tried typing lines at a time in the editor and then
pasting it into interactive ruby, but it still only reads one line at a
time. Please help! I’m understanding all the programming I’m doing but
these 2 basic, setup things, are driving me crazy!

Ey my friend! don’t be crazy. I was in the same foots like you a year
ago. You have to know a few things: what Pine calls a ‘Ruby P.m’ is
a just a *.txt file, with the extension changed to *.rb. There, in a any
text file you can make a programm. Any IDE(Integrated Development
Environment) what does is just help you to write a text file, which will
become your programm, it puts color on strings and colors on variables
because it’s more easy for you to see the code, to read the code, but
still is a text file with utf-8 characters in the most cases. How do you
can execute your programms? (text files… remember), you have to open
the console, I mean cmd, and then put:

ruby ‘C:/RubyPrograms/MyFirstProgram/source_code.rb’

Something like that, you have to put ruby and then the full path.
There’s many things that you have to know but start with this. This way
you can run all the programms you want. I will recommend you a very
light IDE to start, just for strat: InType. Is very basic, then once you
domine some skills, switch to AptanaStudio3, it is free. Best for me is
RubyMine but you have to buy it, is not free. AptanaStudio3 does it
good.
Hope this help you, don’t be afraid to ask. Have fun!

On Mon, Dec 31, 2012 at 2:44 AM, Damián M. González
[email protected] wrote:

complex and big programms and if you know that you are. I’m a starter
stuff lol ^^. Seriously, I don’t know how it is working for a boss in
programming, meaby another has to respond that.

I just want to respond to this part.

There is a saying, “DO what you like, the money will follow”. While
admitted that is rather trite, there is in it also truth. If you
really like programming, strive to become a true craftsperson in
software development. Learn more than just writing code, learn all the
aspects of writing well-crafted, solid, high quality code that someone
else will enjoy using. Getting a job is a means to something else;
money to do other things with. Being a software craftsperson is a
worthy goal. Sure, life is bigger than writing software, but just like
the cabinet maker who loves their craft, they have other passions,
hobbies, social lives, and so on.

Be a whole person. Be a craftsperson. Expand your current horizon, see
the vast opportunities there are, even at this very spot your find
yourself, for learning, growing, practicing, perfecting.

Also remember that software development, the whole of it, is a social
process and endeavour. The things we use to make it are our tools, and
what we make might also become our tools, but we make software for
people to use and enjoy (even if said software is invisible to them).

And, as Damián says, take time to meet with others, talk with others,
learn with others. As you get more comfortable, start contributing to
projects, even if its documentation, testing, and so on, the actual
code is not everything in software.

Learn to research, learn to write, learn to look beyond the immediate
answer to something deeper, more profound, possibly, but always more
fitting. And if it doesn’t exist, make it!