# Rails does not see installed gem in production

**URL:** <https://www.ruby-forum.com/t/rails-does-not-see-installed-gem-in-production/150661>\
**Category:** Rails\
**Created:** [October 11, 2008, 12:31am UTC](https://www.ruby-forum.com/t/rails-does-not-see-installed-gem-in-production/150661 "2008-10-11T00:31:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcampbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Post date:** [October 11, 2008, 12:31am UTC](https://www.ruby-forum.com/t/rails-does-not-see-installed-gem-in-production/150661/1 "2008-10-11T00:31:45Z")

</div>

Everything works like a charm locally, but running in production  
(Dreamhost shared with Passenger if it matters), “These gems that this  
application depends on are missing \n -rmagick”

Rmagick is installed on dreamhost, but I have also copied the gem into  
the vendor directory, so it’s not even found within it’s local files.  
I’m using config.gem ‘rmagick’, which works locally, but I can’t imagine  
how this could be a dreamhost issue since the gem sits inside vendor. On  
the other hand I can’t imagine how this could be a production specific  
problem either, so as you can see I am lost 🙂

---

<div class="post-metadata">

**Author:** ![mcampbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Post date:** [October 11, 2008, 1:09am UTC](https://www.ruby-forum.com/t/rails-does-not-see-installed-gem-in-production/150661/2 "2008-10-11T01:09:38Z")

</div>

> the other hand I can’t imagine how this could be a production specific  
> problem either, so as you can see I am lost 🙂

Rmagick has native extensions right? Maybe you need…

rake gems:build # Build any native extensions for  
unpacked gems

?

-philip

---

<div class="post-metadata">

**Author:** ![mcampbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Post date:** [October 11, 2008, 2:23am UTC](https://www.ruby-forum.com/t/rails-does-not-see-installed-gem-in-production/150661/3 "2008-10-11T02:23:50Z")

</div>

> Rmagick has native extensions right? Maybe you need…
> 
> rake gems:build # Build any native extensions for  
> unpacked gems
> 
> ?
> 
> -philip

I didn’t even consider that. I know there are separate windows and linux  
versions and I did vendorize the right one.

When I run “rake gems:build”, it exits without a whisper. No errors but  
maybe not much else either. It didn’t help though.

When I try gem install rmagick --install-dir=/home//gems it throws  
“Failed to build gem native extension”.

Below that there’s also

“Can’t find Magick-config in  
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games”

I have absolutely no idea what it’s trying to do and why in that  
directory

Messy, but I don’t think even this is the source of my problem.  
Presumably dreamhost’s own rmagick install is functioning correctly, but  
when I clear it from vendor it still doesn’t manage to find the native  
install.

---

<div class="post-metadata">

**Author:** ![mcampbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Post date:** [October 11, 2008, 2:41am UTC](https://www.ruby-forum.com/t/rails-does-not-see-installed-gem-in-production/150661/4 "2008-10-11T02:41:12Z")

</div>

Wow, just got it going.

replaced config.gem ‘rmagick’ with

require ‘rubygems’  
gem ‘rmagick’  
require ‘rmagick’

Old fashioned did the trick. Don’t know why, don’t care, I need to get  
some rest.

Thanks.
