e Text Editor: “ruby: no such file to load — ubygems (LoadError)”

i’ve installed e text editor on my desktop and trying it out for some Ruby development.

E is heavily dependent on using Ruby in the background to perform a number of its refactoring and text-based actions. Unfortunately, sometimes you can end up in a situation where E reports the following error whenever you trigger one of these actions:

ruby: no such file to load — ubygems (LoadError)

It looks obvious that the error is caused because E is trying to load the gem ubygems when it actually meant rubygems, but the problem is more involved than just that.

In my case, it turns out that after running the Ruby one-click installer, the installation creates an system-level environment variable RUBYOPT=-rubygems. This variable setting is what’s giving E its grief.

To fix: Simply remove the environment variable from your system settings and restart e for safe measure. In my experience, there’s no need to download the rubygem package and re-install it as mentioned on another site.

3 comments

  1. @Miguel Madero I’ve actually used both and was not happy with either.

    I found RubyMine quite slow performance wise (even after 1.0 release), and the very few refactorings available didn’t really make it seem like a worthwhile product for what we’re doing (using IronRuby for testing our .NET libraries).

    Ruby in Steel was cute in that it integrated itself with the VS IDE, but apart from syntax highlighting and providing an inline REPL, it didn’t offer anything spectacular.

    I guess i’m just spoiled by VS+R#. If either product get up to that level of quality i’d like to re-evaluate, but until then a simple text-editor is lightweight enough – and E has a form of intellisense which makes it quite neat over (say) Notepad 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>