Won't Go

I

Ill Everbe

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.
 
G

Glen Holcomb

try running irb from the command line

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.


--=20
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can=92t hear a word you=92re saying."

-Greg Graffin (Bad Religion)
 
I

Ill Everbe

Ill said:
Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.

Thanks for reply. i think i mentioned irb works. but i don't guess i can
run programs or edit code in irb.
 
G

Glen Holcomb

Thanks for reply. i think i mentioned irb works. but i don't guess i can
run programs or edit code in irb.
You can test your code in real time. If you want to write a program and ru=
n
it you need to write it in a text editor and then run it from the command
line with ruby <filename>

--=20
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can=92t hear a word you=92re saying."

-Greg Graffin (Bad Religion)
 
W

Walton Hoops

I've never used sciTE so I can't say for sure, but I've heard it said
that Kernel#gets (which is what is actually used when you call gets)
does not work in sciTE, but $stdin.gets does. Alternativly there are
several different IDEs availiable in which Kernel#gets will work fine.
I personally use Aptana Radrails.

There is a list of IDEs being built atm. Hava a look at:
https://spreadsheets.google.com/ccc?key=3D0Al_hzYODcgxwdG9tUFhqcVVoUDVaLT=
lqT2YtNjV1N0E&hl=3Den

Hope this helps!


-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]=20
Sent: Wednesday, September 23, 2009 3:23 PM
To: ruby-talk ML
Subject: Won't Go

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.
--=20
Posted via http://www.ruby-forum.com/.
 
I

Ill Everbe

thanks much. seems to work if i use text editor and then run from
command line.
i will also check out the ide's.

clearly i am no pro. i need to solve complex engineering problems. i now
have 2000 lines of code in liberty basic but wind up passing dozens of
parameters into subroutines. its pretty ugly. now runs but a bit too
complex for me to debug. so i figure oop is the way to go, but
unsuppported by most basic languages. i am a bit fearful to start over
in a new language. i am thinking it is worth effort to learn ruby.

any advice? thanks, craig.
 
W

William Rutiser

Ill said:
thanks much. seems to work if i use text editor and then run from
command line.
i will also check out the ide's.

clearly i am no pro. i need to solve complex engineering problems. i now
have 2000 lines of code in liberty basic but wind up passing dozens of
parameters into subroutines. its pretty ugly. now runs but a bit too
complex for me to debug. so i figure oop is the way to go, but
unsuppported by most basic languages. i am a bit fearful to start over
in a new language. i am thinking it is worth effort to learn ruby.

any advice? thanks, craig.
What kind of problems for what kind of engineering?

Try taking a small piece of basic code and making just the syntactic
changes to get it running in Ruby. Then review the code's control
structures and change them to use Ruby idioms. When you have a problem,
look up the language elements that seem to be involved in a Ruby book.
Check that all the paired things are where they should be( parens,
brackets, braces, quotes, do's, end's etc.).

When you are comfortable with straight procedural Ruby, look for groups
of variables that are usually used together. Replace them with arrays,
hashes, or simple data holding objects. Look for pieces of code that
only involves one kind of object. Make that code into a method on the
object. Explore your program and Ruby together. Every now and then you
will have an an "aha" moment when everything gets smaller, clearer, and
cleaner.

Learn to Ruby's unit test facilities early on. Write little tests for
everything and run them after each change to your code.

Good luck and have fun.

--Bill
 
I

Ill Everbe

engineering problem
if you really want to know
- structural and machinery analysis to dermine the load capacity for
offshore cranes- including impact effects due to wave motion on load
lifted from a workboat, as well as forces due to tilt and veerical and
horizontal acceleration of crane itself mounted on a non level floating
vessel.

ruby looks sweet. i hope to get the hang of oop

thanks much bill, walton and glenn
 
S

Seebs

clearly i am no pro. i need to solve complex engineering problems. i now
have 2000 lines of code in liberty basic but wind up passing dozens of
parameters into subroutines. its pretty ugly. now runs but a bit too
complex for me to debug. so i figure oop is the way to go, but
unsuppported by most basic languages. i am a bit fearful to start over
in a new language. i am thinking it is worth effort to learn ruby.

Any language you learn will probably help you think about programming better.

I find Ruby friendly and expressive. It's far from being the language I'm
best at (I'm definitely better in C and sh, probably better in awk, perl,
and GNU make), but it's a very versatile language.

I have never tried to learn Ruby except as an experienced programmer, so I
am not sure what to recommend. I found the pickaxe book ("Programming Ruby")
quite pleasant and well-written, but I suspect that it helps a lot that
I'm used to programming. I liked Chris Pine's "learning to program", which I
read to see if I could recommend it to people, and I could.

-s
 
D

Dave Lilley

Craig,

Don't know if this is still of use to you _but_ visit
www.rubylearning.com to get in with a community of users who learn ruby
in a collaborative way.

you'll be rubbing shoulders with very experienced programmers be they
sys admins or web developers.

but everyone (in the classes I've been in are starting at a similar
place) and i think if you have done some programming in basic you'll fit
fine.

ruby core is FREE to join.

cheers,

dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top