Gem problem

i installed atom-tools
sudo gem install atom-tools

and i try to use in my code:
require ‘rubygems’
require ‘atom-tools’

i got this error:
1.8/rubygems/custom_require.rb:27:in `require’: no such file to
load – atom-tools (LoadError)

anyone can help me ?
thanks

Elton Okada wrote:

anyone can help me ?
thanks

The name of the gem is not necessarily the name of the thing you need to
require. I don’t use this gem, but according to this web site:
http://code.necronomicorp.com/atom-tools it looks like you need to
require “atom/tools”.

Tim H. wrote:

Elton Okada wrote:

anyone can help me ?
thanks

The name of the gem is not necessarily the name of the thing you need to
require. I don’t use this gem, but according to this web site:
http://code.necronomicorp.com/atom-tools it looks like you need to
require “atom/tools”.

Yes, i change this name, and i also try with another libraries… always
the same error, i think there is a problem with gem…

On Wed, Mar 26, 2008 at 07:18:01AM +0900, s.ross wrote:

maybe some error

require ‘rubygems’
require ‘atom/tools’

does this work?

Using irb, you get immediate feedback. If it works in irb but not your
program, check your .irbrc because it might require rubygems.

That’s almost certainly the problem in this case – that the following
line is needed:

require ‘rubygems’

On Mar 25, 2008, at 3:09 PM, Elton Okada wrote:

require “atom/tools”.

Yes, i change this name, and i also try with another libraries…
always
the same error, i think there is a problem with gem…

The way I usually approach this is in irb.

$ irb

require ‘atom/tools’

maybe some error

require ‘rubygems’
require ‘atom/tools’

does this work?

Using irb, you get immediate feedback. If it works in irb but not your
program, check your .irbrc because it might require rubygems.

If your Ruby paths are set correctly, it’s probably because you haven’t
loaded up RubyGems. I don’t blame you either. I ran into the same
thing when I started and it took me a while to figure it out. There’s
three ways you can do this.

  1. Require ‘rubygems’ in your source file
  2. Run the script with the -rubygems switch
  3. Set the RUBYOPT environment variable to ‘rubygems’

More info is on the RubyGems User Guide:
http://docs.rubygems.org/read/chapter/3#page70

Elton Okada wrote:

  require 'atom-tools'

Hi Elton,

I had the same misunderstanding. The atom-tools is a collection of
tools, and you need to specify the appropriate tool by name.

There’s a README in the gem directory for this gem that lists them all,
but in short, you probably want

require ‘atom/feed’

If your operating system is unix-like, you should be able to navigate
down into your gem directory and get to the atom directory, underneath
which you’ll see feed and others. So in unix form, the directory path
makes sense for the require statement, since “feed” is a subdirectory of
“atom”

Cheers!

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