RailsCasts Pro episodes are now free!

Learn more or hide this

QuentinLangeveldt's Profile

GitHub User: QuentinLangeveldt

Comments by

Avatar

I am trying to require the RMagick gem in a gem I'm making. I included it as a dependency in my gemspec file.

ruby
 gem.add_development_dependency('rmagick')

and require it before use in my lib/say_hello.rb

ruby
require 'rmagick'
module SayHello
  def self.hello
          "Hello my friend"
  end
end

After that i bundle install, gem bundle, gem install.

The gem work without the 'require rmagick' but i receive the following error otherwise.

/Users/****/.rvm/gems/ruby-1.9.3-p194/gems/say_hello-0.0.1/lib/say_hello.rb:2:in require': cannot load such file -- rmagick (LoadError)

Can anyone give me some advice on what I am doing wrong?

Thanks in advance..