[英]How to install and use a gem inside an rails engine
I use refinery-cms to create a webshop in ruby-on-rails and refinery is largely based on engines. 我使用finery-cms在ruby-on-rails上创建一个网上商店,而refinery主要基于引擎。 I have therefore made a "webshop" engine with all my models, and i want to install the gem "activeadmin" inside this engine, so when i run "rails g active_admin:install" it will create the model and config files inside my engine dir.
因此,我为所有模型制作了一个“ webshop”引擎,并且我想在该引擎中安装gem“ activeadmin”,因此当我运行“ rails g active_admin:install”时,它将在我的引擎中创建模型和配置文件目录 I can only get it to install in the root app
我只能将其安装在根应用程序中
Hope you can help me 希望你能帮我
/Johan /约翰
解决此问题的方法只是将CD插入引擎文件夹,然后从那里运行generator命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.