# Vendored Oniguruma gem MissingSourceFile oregexp

**URL:** <https://www.ruby-forum.com/t/vendored-oniguruma-gem-missingsourcefile-oregexp/176752>\
**Category:** Ruby\
**Created:** [October 5, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/vendored-oniguruma-gem-missingsourcefile-oregexp/176752 "2009-10-05T20:32:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfeadler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mfeadler](https://www.ruby-forum.com/u/mfeadler)\
**Post date:** [October 5, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/vendored-oniguruma-gem-missingsourcefile-oregexp/176752/1 "2009-10-05T20:32:41Z")

</div>

Hi All,

Hoping someone can help me with this. I have installed the Oniguruma gem  
by compiling from source and then installing the gem based on the  
instructions here:

[http://www.goodbyehelicopter.com/2008/02/20/install-oniguruma-on-os-x/](http://www.goodbyehelicopter.com/2008/02/20/install-oniguruma-on-os-x/)

My environment is mac osx leopard running ruby 1.8.6 and rails 2.3.4.

I can now run the following irb session successfully:

irb(main):001:0\> require ‘rubygems’  
=\> true  
irb(main):002:0\> require ‘oniguruma’  
=\> true  
irb(main):003:0\> require ‘uv’  
=\> true  
irb(main):006:0\> result = Uv.parse( “.thing {background-color: red}”,  
“xhtml”, “css”, true, “amy”)  
=\> “\<pre class="amy"\>\<span class="line-numbers"\> 1 \<span  
class="TagAttribute"\>\<span class="Punctuation"\>.thing  
\<span class="Punctuation"\>{\<span  
class="LibraryClassType"\>background-color\<span  
class="Punctuation"\>: \<span  
class="LibraryConstant"\>red\<span  
class="Punctuation"\>}\n”  
irb(main):007:0\>

Then I vendored the gem using rake gems:unpack:dependencies.

Then when starting the server or running a console in dev mode, when  
requiring ultraviolet I get the following error:

Loading development environment (Rails 2.3.4)  
irb: warn: can’t alias context from irb\_context.

> > require ‘uv’  
> > MissingSourceFile: no such file to load – oregexp  
> > from  
> > /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:36:in  
> > `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’  
> > from  
> > /Users/matthewling/work/personal/codiary/trunk/vendor/rails/activesupport/lib/active\_support/dependencies.rb:156:in  
> > `require' from /Users/matthewling/work/personal/codiary/trunk/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new\_constants\_in’  
> > from  
> > /Users/matthewling/work/personal/codiary/trunk/vendor/rails/activesupport/lib/active\_support/dependencies.rb:156:in  
> > `require' from /Users/matthewling/work/personal/codiary/trunk/vendor/gems/oniguruma-1.1.0/lib/oniguruma.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require’  
> > from  
> > /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
> > `require’

I can see that oregexp.c is under vendor → gems → oniguruma-1.1.0 →   
ext but not quite sure what the custom require is missing to load the  
gem.

Has anyone seen this before or some advice if it looks like a standard  
or fixable error? It seems to rather be a rails thing, since I can load  
the gem from an irb session properly.

Would really appreciate any help …

Best

Matt

---

<div class="post-metadata">

**Author:** ![mfeadler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mfeadler](https://www.ruby-forum.com/u/mfeadler)\
**Post date:** [October 5, 2009, 8:55pm UTC](https://www.ruby-forum.com/t/vendored-oniguruma-gem-missingsourcefile-oregexp/176752/2 "2009-10-05T20:55:13Z")

</div>

On Mon, Oct 5, 2009 at 9:32 PM, Matthew F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Then when starting the server or running a console in dev mode, when  
> requiring ultraviolet I get the following error:
> 
> Loading development environment (Rails 2.3.4)  
> irb: warn: can’t alias context from irb\_context.
> 
> > > require ‘uv’  
> > > MissingSourceFile: no such file to load – oregexp

Did you run

rake gems:build

to build native extensions for vendored gems?

---

<div class="post-metadata">

**Author:** ![mfeadler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mfeadler](https://www.ruby-forum.com/u/mfeadler)\
**Post date:** [October 8, 2009, 2:58pm UTC](https://www.ruby-forum.com/t/vendored-oniguruma-gem-missingsourcefile-oregexp/176752/3 "2009-10-08T14:58:35Z")

</div>

Nikolai L. wrote:

> On Mon, Oct 5, 2009 at 9:32 PM, Matthew F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > Then when starting the server or running a console in dev mode, when  
> > requiring ultraviolet I get the following error:
> > 
> > Loading development environment (Rails 2.3.4)  
> > irb: warn: can’t alias context from irb\_context.
> > 
> > > > require ‘uv’  
> > > > MissingSourceFile: no such file to load – oregexp
> 
> Did you run
> 
> rake gems:build
> 
> to build native extensions for vendored gems?

Hey Nikolai,

Awesome! That was it, that’s what I love about this community, friendly  
helpful people everywhere …

Thanks mate!

Matthew
