Posts Tagged ruby
Updating RubyGems on Ubuntu to Install Jekyll
Having recently read about Jekyll I decided to boot up Ubuntu, install all the bits and pieces and give it a try. However, I fell at the first hurdle when greeted by the following error:
Error installing gemcutter:
gemcutter requires RubyGems version >= 1.3.5
The Synaptic Package Manager reported everything as being up-to-date but only to version 1.3.1. As it turns out, there is another way to update rubygems on Ubuntu, which worked a treat! The rest of the installation was a breeze
If you are interested more info on Jekyll can be found on GitHub.
E Text Editor and the ruby: no such file to load rubygems error
So, you are using the e text editor and try to run a bundle only to be confronted with the following:
ruby: no such file to load — ubygems (LoadError) ruby: no such file to load — ubygems (LoadError)
After doing some digging it turns out the cause is the RUBYOPT=-rubygems environment variable that is set by the Windows one-click Ruby installer. Now, if you have not got rubygems installed you might be able to get away with simply unsetting the RUBYOPT environment variable (although YMMV).
However, as e text editor makes use of Ruby via Cygwin, another solution is to modify your .bashrc file:
Try this:Go to the cygwin bash prompt. If you don't know how to get there, use Start -> Run -> c:\cygwin\cygwin.bat.Type: echo unset RUBYOPT >> .bashrcType: . .bashrcType: irbIf you see: irb(main):001:0>You should be good to go.
But what worked for me – and I don’t know whether this has anything to do with me having Ruby installed under Windows and under Cygwin – was making the same changes to .bashrc outlined above to my .profile script (so simply replace .bashrc with .profile in the quoted text above).
Hopefully at least one of these methods should work for you.