CODE RUBY HELP

karamise
5 years ago

0

Hello can someone help you I follow lost …

I want to code in RUBY j uses the text editor but the code backup and I but the name of the file in my conssole irb

And it does not work ….. I do not understand …

5replies
4voices
219views
Mugi [Mugiwara27]
5 years ago

0

First, try speaking a better English/ use translate because your post is not unintelligible :)

[deleted user]
5 years ago

0

[POSSIBLE TRANSLATION]

Hello, can someone help me? I’m lost.

I want to code in “Ruby” I used the text editor; saved my work and tried to open the file in my console.

Even after all this it doesn’t appear to work, i don’t understand why…

Mugi [Mugiwara27]
5 years ago

0

Yup, that’s the actual translation, he did something a lot of Frenchies are doing ; translating a word using Google Translate and copying/pasting it into their their text without knowing it doesn’t make sense

E.g:
- “je suis” = “I am” / “je suit” = “I’m following” ==> bad translation because OP doesn’t even know French
- “sauvegarde” = “backup” / “sauvegarder” = “to save” ==> bad translation ‘cause OP is OP
- “met” = “put” / “mais” = “but” ==> bad translation because OP doesn’t even know French x2

pls explain in French if you’re having such big problems with English, I’ll translate myself for others!
stp explique en France si tu as d'autant gros soucis avec l'Anglais, je traduirais moi-me pour les autres!

karamise
5 years ago

0

thank you

dloser
5 years ago

0

Wait… I thought this thread was about getting help with Ruby, not French…

Anyway… I googled “irb load file” and found https://stackoverflow.com/questions/13112245, which seems to be very helpful.

$ cat > hello.rb << EOF  
> puts "Hello, HackThis!!"  
> EOF  

$ irb -r hello.rb  
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require':LoadError: cannot load such file -- hello.rb  
irb(main):001:0>   

$ irb -I . -r hello.rb  
Hello, HackThis!!  
irb(main):001:0>   

$ irb -r ./hello.rb  
Hello, HackThis!!  
irb(main):001:0>   

$ irb  
irb(main):001:0> require "hello.rb"  
LoadError: cannot load such file -- hello.rb  
        from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
        from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
        from (irb):1  
        from /usr/bin/irb:11:in `<main>'  

irb(main):002:0> require "./hello.rb"  
Hello, HackThis!!  
=> true  
irb(main):003:0>   
You must be logged in to reply to this discussion. Login
1 of 6

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss