# Jason King's inline\_attachment probs

**URL:** <https://www.ruby-forum.com/t/jason-kings-inline-attachment-probs/162467>\
**Category:** Rails\
**Created:** [March 10, 2009, 6:56am UTC](https://www.ruby-forum.com/t/jason-kings-inline-attachment-probs/162467 "2009-03-10T06:56:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunaclaire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Post date:** [March 10, 2009, 6:56am UTC](https://www.ruby-forum.com/t/jason-kings-inline-attachment-probs/162467/1 "2009-03-10T06:56:52Z")

</div>

I recently added the inline\_attachment gem ([http://github.com/](http://github.com/)  
JasonKing/inline\_attachment/tree/master) to enable the use of  
image\_tag in html emails.

It’s ~kinda~ working, but I have a problem…

It works in that I do get emails sent with the images in them and it  
all looked good… but, then I found that the rake task that runs off  
a cron job to send nightly emails seems to result in bringing down my  
main app with 503 errors.

It seems that where it chokes is the line in environment.rb that we’re  
directed to include:

config.gem ‘inline\_attachment’

Even though the gem appears to be installed correctly (indeed it seems  
to be working since I do get those images in the emails), this is the  
error that shows up in the trace from the rake task:

[deploy@blue current]$ rake tasks:send\_updates RAILS\_ENV=production –  
trace  
(in /var/www/apps/redeye/releases/20090310053759)  
\*\* Invoke tasks:send\_updates (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
no such file to load – inline\_attachment  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’

Missing these required gems:  
inline\_attachment

You’re running:  
ruby 1.8.6.287 at /usr/bin/ruby  
rubygems 1.3.1 at /home/deploy/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

Any ideas on why the gem seems to be working, but I get this error?

And I’m not sure why I end up with 503’s after running the task and  
have to restart the app… any ideas on that?
