简体   繁体   中英

Rails 4 gem creating

I'm trying to write my first rails 4 gem. There are lib folder that include general 'import_1c.rb' gem file in which I wrote:

module Import1c
  class Engine < Rails::Engine
  end
end

It's also fine. File is processing successfully. But there is also lib/app folder which contains controllers, models, views and lib/config which contains route file. In gemspec I write next:

spec.files         = Dir['lib/**/**/*']

And also if I write: puts spec.files - I will see all my gems files. But no one file, except import_1c, is not processing while I'm not include it into general gem file.

The reason was that I create gem instead plugin. Like:

 rails plugin new import_1c --mountable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM