Hi,
My install of Ruby doesn’t seem to be able to find any gems. I’m getting
this error when just running a Ruby script. I’m using Ruby 2.0.0.p0.
F:\workflows\graphics\Asura-Non\RCSCR\in>ruby -d
e:\live\scripts\ruby\asura-non\rcscr\rcscr_pdf_single.rb
hist205ar-15.pdf
Exception LoadError' at C:/Ruby200/lib/ruby/2.0.0/rubygems.rb:1082 - cannot load such file -- rubygems/defaults/ruby ExceptionErrno::ENOENT’ at C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1620
- No such file or directory - hist205ar-15.pdf
C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1620:in `stat’: No such file or
directory - hist205ar-15.pdf (Errno::ENOENT)
Thank you,
Peter
On Tue, May 7, 2013 at 6:54 AM, Peter B. [email protected]
wrote:
Exception `Errno::ENOENT’ at C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1620
- No such file or directory - hist205ar-15.pdf
C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:1620:in `stat’: No such file or
directory - hist205ar-15.pdf (Errno::ENOENT)
Thank you,
Peter
–
Posted via http://www.ruby-forum.com/.
What do you get if you just try something like:
ruby -e ‘puts “Hello, world”’
Also, try running that script without the file name argument.
And have you checked to make sure hist205ar-15.pdf does exist in the
directory you’re running that from?
On Tue, May 7, 2013 at 7:41 AM, tamouse mailing lists
[email protected] wrote:
cannot load such file – rubygems/defaults/ruby
What do you get if you just try something like:
ruby -e ‘puts “Hello, world”’
Also, try running that script without the file name argument.
And have you checked to make sure hist205ar-15.pdf does exist in the
directory you’re running that from?
Trying this locally, this is what I get:
$ ruby -d -e ‘puts “hello,world”’
Exception `LoadError’ at
/home/tamara/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb:1073
- cannot load such file – rubygems/defaults/operating_system
Exception `LoadError’ at
/home/tamara/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb:1082
- cannot load such file – rubygems/defaults/ruby
hello,world
$ ruby -e ‘puts “hello,world”’
hello,world
So, it’s not a 2.0 problem. It may not be a problem at all, as all -d
is doing is setting the $DEBUG global to true, AFAICT. (If you’re
expecting that to launch in debug mode, that won’t do it. Try pry
instead.)
tamouse mailing lists wrote in post #1108085:
On Tue, May 7, 2013 at 7:41 AM, tamouse mailing lists
[email protected] wrote:
cannot load such file – rubygems/defaults/ruby
What do you get if you just try something like:
ruby -e ‘puts “Hello, world”’
Also, try running that script without the file name argument.
And have you checked to make sure hist205ar-15.pdf does exist in the
directory you’re running that from?
Trying this locally, this is what I get:
$ ruby -d -e ‘puts “hello,world”’
Exception `LoadError’ at
/home/tamara/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb:1073
- cannot load such file – rubygems/defaults/operating_system
Exception `LoadError’ at
/home/tamara/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb:1082
- cannot load such file – rubygems/defaults/ruby
hello,world
$ ruby -e ‘puts “hello,world”’
hello,world
So, it’s not a 2.0 problem. It may not be a problem at all, as all -d
is doing is setting the $DEBUG global to true, AFAICT. (If you’re
expecting that to launch in debug mode, that won’t do it. Try pry
instead.)
Thanks.
I get hello, world with your suggestion.
Yes, the file is indeed there. If I run it without a “-d,” I get a “no
implicit conversion of nil into string” error.
tamouse mailing lists wrote in post #1108166:
On Tue, May 7, 2013 at 8:01 AM, Peter B. [email protected]
wrote:
Also, try running that script without the file name argument.
/home/tamara/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb:1073
So, it’s not a 2.0 problem. It may not be a problem at all, as all -d
is doing is setting the $DEBUG global to true, AFAICT. (If you’re
expecting that to launch in debug mode, that won’t do it. Try pry
instead.)
Thanks.
I get hello, world with your suggestion.
Yes, the file is indeed there. If I run it without a “-d,” I get a “no
implicit conversion of nil into string” error.
My first suggestion is dump the -d; it’s not doing what you think, and
obviously masking another error. Look at the backtrace from that error
and find out where it’s happening, and trace it back to your code.
You might want to look at pry for a pretty nice debugger, but the ruby
debugger works decently. You have to insert it into your code though,
this is NOT done by using -d on the command line.
Use gem or bundler to install the debugger, then place the following
in your file:
require 'debugger'
debugger
That will call the debugger at the beginning and you can walk through.
Thanks. I think I’ve got it now. I had to install the Dev_Kit, properly.
That wasn’t easy.
Cheers.
On Tue, May 7, 2013 at 8:01 AM, Peter B. [email protected]
wrote:
Also, try running that script without the file name argument.
/home/tamara/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb:1073
So, it’s not a 2.0 problem. It may not be a problem at all, as all -d
is doing is setting the $DEBUG global to true, AFAICT. (If you’re
expecting that to launch in debug mode, that won’t do it. Try pry
instead.)
Thanks.
I get hello, world with your suggestion.
Yes, the file is indeed there. If I run it without a “-d,” I get a “no
implicit conversion of nil into string” error.
My first suggestion is dump the -d; it’s not doing what you think, and
obviously masking another error. Look at the backtrace from that error
and find out where it’s happening, and trace it back to your code.
You might want to look at pry for a pretty nice debugger, but the ruby
debugger works decently. You have to insert it into your code though,
this is NOT done by using -d on the command line.
Use gem or bundler to install the debugger, then place the following
in your file:
require 'debugger'
debugger
That will call the debugger at the beginning and you can walk through.