# Plugin with custom gems

**URL:** <https://meta.discourse.org/t/plugin-with-custom-gems/57190>\
**Category:** Development\
**Created:** [2017 年2 月 9 日 17:45 UTC](https://meta.discourse.org/t/plugin-with-custom-gems/57190 "2017-02-09T17:45:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![leo.proctor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leo.proctor/32/216158_2.png) [@leo.proctor](https://meta.discourse.org/u/leo.proctor)\
发布日期： [2017 年2 月 9 日 17:45 UTC](https://meta.discourse.org/t/plugin-with-custom-gems/57190/1 "2017-02-09T17:45:17Z")

</div>

I’ve some custom gems in my plugin. it works fine on local machine. but on prod while following your app.yml format for installing private plugins, it fails with following error.

> I, [2017-02-09T17:13:20.015101 #13] INFO – : \> cd /var/www/discourse && sudo -E -u discourse bundle exec rake assets:precompile  
> ERROR: While executing gem … (Errno::EACCES)  
> Permission denied @ dir\_s\_mkdir - /var/www/discourse/plugins/my-plugin/gems  
> I, [2017-02-09T17:13:26.998142 #13] INFO – : Your home directory is not set properly:
> 
> - `/root` is not writable

> Bundler will use `/tmp/bundler/home/discourse` as your home directory temporarily  
> gem install macaddr -v 1.0.0 -i /var/www/discourse/plugins/my-plugin/gems/2.3.3 --no-document --ignore-dependencies

> You are specifying the gem macaddr in /var/www/discourse/plugins/my-plugin/plugin.rb, however it does not exist!

Any help?

---

_[View the full topic](https://meta.discourse.org/t/plugin-with-custom-gems/57190)._
