Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ruby Program Error
#1
EDIT: This thread is really old, thanks for all the people who have helped, i was a complete Ruby Newbie .

I am sorry this is the wrong forum but look

i just started learning ruby and well, i made a Hello World!

anyways when i run it it gives me an error:

Code:
syntax error, unexpected kEND, expecting $end

anyways, here is the program:

Code:
puts 'Hello World!'
puts 'Well, this is my first program in ruby :)'
puts 'So, What is your name?'
name = gets.chomp
puts 'Very Nice Name,' + name
puts 'Well, I hope you enjoyed my Program'
puts 'Goodbye! :) '
puts ' '
end

if name == 'Ehab'
puts 'Oh, Hello Master'
puts 'Thank you for creating me'
puts 'Work Harder learning ruby, so you can make me better'
puts ' '
puts 'If you want to enter the matrix, please type the password'
pass == gets.chomp

if pass == 'ruby'
  puts 'Congratulations, You Have Cracked The Password!'
  
  else
  end

Help Please?
Reply


Messages In This Thread
Ruby Program Error - by Closed - 12-12-2009, 11:40 AM
RE: Ruby Program Error (wrong forums) - by Gaijin - 12-12-2009, 12:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Started With Ruby eax 7 5,092 12-13-2012, 10:03 AM
Last Post: L-Carnitine
  [Tut] How to install Ruby on Mac, Windows and Linux Jordan L. 13 8,540 12-13-2012, 07:49 AM
Last Post: L-Carnitine
  Ruby eBook sockatobi 7 3,145 12-13-2012, 07:48 AM
Last Post: L-Carnitine
  what is ruby on rails DaUB3R 3 2,064 11-01-2012, 04:20 AM
Last Post: johnnymward
  Should I Start Ruby? BreShiE 13 5,861 11-13-2011, 04:14 PM
Last Post: Speedy

Forum Jump:


Users browsing this thread: 1 Guest(s)