Require problem

Hi all
I installed ruby in Ubuntu 14.04.
Installed rmagick (sudo gem install rmagick)
I go to irb and write require rmagick
It shows me an error
irb(main):001:0> require rmagick
NameError: undefined local variable or method rmagick' for main:Object from (irb):1 from /usr/bin/irb:12:in
irb(main):002:0>

and

ruby iptc.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- rmagick (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require’
from iptc.rb:3:in `’

gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.23
  • RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux]
  • INSTALLATION DIRECTORY: /var/lib/gems/1.9.1
  • RUBY EXECUTABLE: /usr/bin/ruby1.9.1
  • EXECUTABLE DIRECTORY: /usr/local/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:
    • /var/lib/gems/1.9.1
    • /home/helloworld/.gem/ruby/1.9.1
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

irb(main):001:0> $LOAD_PATH
=> [“/usr/local/lib/site_ruby/1.9.1”,
“/usr/local/lib/site_ruby/1.9.1/x86_64-linux”,
“/usr/local/lib/site_ruby”, “/usr/lib/ruby/vendor_ruby/1.9.1”,
“/usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux”,
“/usr/lib/ruby/vendor_ruby”, “/usr/lib/ruby/1.9.1”,
“/usr/lib/ruby/1.9.1/x86_64-linux”]

ls -l /var/lib/gems/1.9.1/gems/
razem 4
drwxr-xr-x 8 root root 4096 paź 7 12:38 rmagick-2.13.3

You are missing the quotes, it’s:

require ‘rmagick’

irb(main):001:0> require ‘rmagick’
LoadError: cannot load such file – rmagick
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
from (irb):1
from /usr/bin/irb:12:in `’

#!/usr/bin/ruby

require ‘rmagick’

img = Magick::Image::read(“FB_129991.JPG”)[0]
puts “This image is #{img.columns}x#{img.rows} pixels”

It should be
require ‘RMagick’

Perhaps. You should look the documentation.