Unable to load gem after its installation

1k Views Asked by At

How to use an external library in Ruby?

I just installed Addressable library as stated in the documentation and write the following code:

require 'addressable/uri'

and it still says:

E:/software/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- addressable/uri (LoadError)

What am I doing wrong? How can I fix it?

2

There are 2 best solutions below

0
On

Maybe you can try uninstall all versions of addressable, and then reinstall it.

0
On

You need install addressable. Run the following in your command line:

$ gem install addressable