Problem With Ruby IRB
#1
Good day everybody,

I've just upgraded to a new computer and am setting everything up like I used to have it.

For the life of me I cannot find the answer I'm looking for.

Ruby has been reinstalled and I forget how to handle IRB errors without the window closing in a split second. Does anybody know how to make it where the Ruby IRB window stays open until I close it? I need to see my error backtrace.
[Image: Button-BOTB.png]
[Image: Save-Point.gif][Image: Button-You-Tube2.png][Image: Button-Sound-Cloud2.png][Image: Button-Audio-Mack2.png]
[Image: LS-Banner.gif]
NEW ALBUM OUT NOW!

Reply }
#2
(12-19-2021, 01:30 PM)Kain Nobel Wrote: Good day everybody,

I've just upgraded to a new computer and am setting everything up like I used to have it.

For the life of me I cannot find the answer I'm looking for.

Ruby has been reinstalled and I forget how to handle IRB errors without the window closing in a split second. Does anybody know how to make it where the Ruby IRB window stays open until I close it? I need to see my error backtrace.

Thinking Let me see...

One way is the hard way, to open the console window first and then type the whole path to your file. PC No IRB included here. Winking

Another one could be to type the following line of code:

Code:
irb -r ./filename.rb

Also you could add this to a begin rescue loop as well:

Code:
system("PAUSE")

or

gets

or

$stdin.gets

Happy with a sweat In theory it should pause it. I won't be responsible for any side effects. Tongue sticking out
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#3
Ah, thank you Kyonides!

Code:
begin
  # Load the source
  require 'fxruby'
  # Build the widget...

rescue Exception => e
  p(e.message)
  system("PAUSE")
end

Works great! Thanks!
[Image: Button-BOTB.png]
[Image: Save-Point.gif][Image: Button-You-Tube2.png][Image: Button-Sound-Cloud2.png][Image: Button-Audio-Mack2.png]
[Image: LS-Banner.gif]
NEW ALBUM OUT NOW!

Reply }




Users browsing this thread: 1 Guest(s)