I'm kind of new to Ubuntu. I got this error when trying to install bundle:
$ sudo gem install bundle
⏎ <internal:gem_prelude>:1:in `require':
⏎ cannot load such file -- rubygems.rb (LoadError) from
⏎ <internal:gem_prelude>:1:in `<compiled>'
In some similar problems, it was suggested to remove rvm and ruby completelty, so I tried following the answers here.
rvm preload
worked, but when trying to gem uninstall rvm
I got the same message...
$ gem uninstall rvm
⏎ <internal:gem_prelude>:1:in `require': cannot load such file -- > rubygems.rb (LoadError)
⏎ from <internal:gem_prelude>:1:in `<compiled>'
When i did ruby -v
, I got:
$ ruby -v
⏎ The program 'ruby' can be found in the following packages:
⏎ * ruby
⏎ * ruby1.8
⏎ Try: sudo apt-get install <selected package>
I tried to sudo apt-get install ruby
as suggested, it returned:
ruby is already the newest version.
[...]
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I want to clean all of the ruby-related packages from my computer and start it all anew. Can you please help me doing that?
Some more details that may help:
Before doing rvm
implode, I cleaned every rvm or gem related lines from my .bashrc
and .bash_profile
files.
$ ls /usr/lib/ruby
and
$ ls /usr/bin/ruby
return an empty dir.
/usr/lib
has no other interesting directories, but /usr/bin
has:
$ ls /usr/bin
⏎ [...] rake rake1.9.1 rake2.2 rdoc
⏎ rdoc1.9.1 rdoc2.2 ri ri1.9.1 ri2.2 ruby1.9.1 ruby2.2
/usr/local/lib
also had no interesting directories, but:
$ ls /usr/local/bin
⏎ [...] bundle bundler rake