Error is coming with ruby commandline option "-d"

Hi,

I was trying to play with -d option in Ruby. But getting the below
error.

@ubuntu:~$ ruby -d -e ‘“gg”’
Exception LoadError' at /usr/lib/ruby/1.9.1/rubygems.rb:1264 - cannot load such file -- rubygems/defaults/operating_system ExceptionLoadError’ at /usr/lib/ruby/1.9.1/rubygems.rb:1273 - cannot
load such file – rubygems/defaults/ruby
-e:1: warning: possibly useless use of a literal in void context
@ubuntu:~$

Could anyone help me to fix this by saying why is that coming?

Thanks

That’s simply what -d does – it prints all exceptions that ever happen
in your code, even if they are rescued.

Bartosz Dziewoński wrote in post #1096783:

even if they are rescued. <~~~~ Could you explain this line more
elaborately?

Am 14.02.2013 00:17, schrieb Love U Ruby:

Bartosz Dziewoński wrote in post #1096783:

even if they are rescued. <~~~~ Could you explain this line more
elaborately?

could you google “ruby rescue exceptions”?

unknown wrote in post #1096794:

Am 14.02.2013 00:17, schrieb Love U Ruby:

Bartosz Dziewoński wrote in post #1096783:

even if they are rescued. <~~~~ Could you explain this line more
elaborately?

could you google “ruby rescue exceptions”?

Yes I know what is “rescue”, rather I asked the explanation - “it prints
all exceptions that ever happen in your code, even if they are rescued.”

Thanks

On Feb 13, 2013, at 23:06 , Love U Ruby [email protected] wrote:

Yes I know what is “rescue”, rather I asked the explanation - “it prints
all exceptions that ever happen in your code, even if they are rescued.”

Do you realize that you’ve burned most of your bridges here, right?

Heed the criticism you’re getting now or you’re going to get cut off
entirely.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs