Posts: 936
Threads: 100
Joined: May 2009
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.
Posts: 4,254
Threads: 403
Joined: Dec 2009
(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 Thinking](https://www.save-point.org/images/smilies/ejlol/think.gif)
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 PC](https://www.save-point.org/images/smilies/ejlol/pc.gif)
No IRB included here.
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 Happy with a sweat](https://www.save-point.org/images/smilies/ejlol/sweathappy.gif)
In theory it should pause it. I won't be responsible for any side effects.
"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.
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!
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
Posts: 936
Threads: 100
Joined: May 2009
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!