<commit_before>---
layout: post
title: 'Ruby LoadError: cannot load such file'
---

So, you’ve just upgraded your Ruby app to Ruby 1.9.2, 1.9.3, 2.0.0, or greater, and you’re hit with:

{% highlight ruby %}
 LoadError: cannot load such file -- somefile
{% endhighlight %}

Your code will most likely look something like this:

{% highlight ruby %}
 require 'my-ruby-code'
 require 'some-gem'
 ...
{% endhighlight %}

Don’t panic! In Ruby 1.9.2, the current path was removed from the load path, so you simply need to change the ‘require’ statements to your own code to include the current load path:

{% highlight ruby %}
 require './my-ruby-code'
 require 'some-gem'
 ...
{% endhighlight %}<commit_msg>More build errors!?<commit_after>---
layout: post
title: 'Ruby LoadError: cannot load such file'
---

So, you’ve just upgraded your Ruby app to Ruby 1.9.2, 1.9.3, 2.0.0, or greater, and you’re hit with:

```
 LoadError: cannot load such file -- somefile
```

Your code will most likely look something like this:

```
 require 'my-ruby-code'
 require 'some-gem'
 ...
```

Don’t panic! In Ruby 1.9.2, the current path was removed from the load path, so you simply need to change the ‘require’ statements to your own code to include the current load path:

```
 require './my-ruby-code'
 require 'some-gem'
 ...
```
{'fraction_non_alphanumeric': 0.1293759512937595, 'fraction_numerical': 0.0182648401826484, 'mean_word_length': 3.5344827586206895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7056838', 'n_tokens_mistral': 447, 'n_tokens_neox': 404, 'n_words': 183}