Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby in `gem_original_require': no such file to load -- CloudyScripts (LoadError)

Tags:

ruby

gem

On Ubuntu and Ruby 1.8.7, I installed CloudyScripts via:

gem install gem install CloudyScripts

When I try to execute this:

require 'rubygems'
require 'CloudyScripts'

I get the following error:

/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- CloudyScripts (LoadError)
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/ubuntu/copyami.rb:3

$ gem list

*** LOCAL GEMS ***

amazon-ec2 (0.9.17)
CloudyScripts (1.9.40)
net-scp (1.0.4)
net-ssh (2.2.1)
xml-simple (1.1.0)

The gem is installed in /var/lib/gems/1.8/gems, the contents of which are

drwxr-xr-x 6 root root 4096 2011-08-31 17:39 amazon-ec2-0.9.17
drwxr-xr-x 3 root root 4096 2011-08-31 18:39 CloudyScripts-1.9.40
drwxr-xr-x 4 root root 4096 2011-08-31 17:39 net-scp-1.0.4
drwxr-xr-x 5 root root 4096 2011-08-31 17:39 net-ssh-2.2.1
drwxr-xr-x 3 root root 4096 2011-08-31 17:39 xml-simple-1.1.0

And $LOAD_PATH is /usr/local/lib/site_ruby/1.8 /usr/local/lib/site_ruby/1.8/x86_64-linux /usr/local/lib/site_ruby /usr/lib/ruby/vendor_ruby/1.8 /usr/lib/ruby/vendor_ruby/1.8/x86_64-linux /usr/lib/ruby/vendor_ruby /usr/lib/ruby/1.8 /usr/lib/ruby/1.8/x86_64-linux .

Why am I getting the load error?

like image 548
Sajee Avatar asked Aug 31 '11 19:08

Sajee


1 Answers

You should try

gem "CloudyScripts"
require "cloudyscripts"

Only the gem name is camelcased, but not the ruby files in it.

like image 137
Marcel Jackwerth Avatar answered Sep 19 '22 14:09

Marcel Jackwerth