# تحويل ملفات Ruby بسيطة إلى gem Ruby

**URL:** <https://meta.discourse.org/t/transforming-simple-ruby-files-into-a-ruby-gem/103399>\
**Category:** Development\
**Created:** [3 ديسمبر 2018، 9:56م UTC](https://meta.discourse.org/t/transforming-simple-ruby-files-into-a-ruby-gem/103399 "2018-12-03T21:56:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![SebastianADW](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@SebastianADW](https://meta.discourse.org/u/SebastianADW)\
**Post date:** [3 ديسمبر 2018، 9:56م UTC](https://meta.discourse.org/t/transforming-simple-ruby-files-into-a-ruby-gem/103399/1 "2018-12-03T21:56:30Z")

</div>

Hey,

i am trying to create my first plugin for discourse. I already have the ruby code working fine. I have 4 different ruby files with different kind of methods in it, i like to have them splitted. And a Gemfile and a Gemfile.lock  
How can i transform them now into a Discourse Plugin?  
I already read the Plugin Beginner Tutorial, but it focused on JavaScript Code and not so much on pure ruby code i guess? I am just not sure where to put my files. Is it possible to let them split up and copy the code of the “main” file into the plugin.rb ?  
I didnt use any kind of class definitions or something like that just tried to split different functionality in different files and methods.  
Where do i have to put the Gemfile and the Gemfile.lock

Tried it local but it didnt find the twitter gem which is necessary for it to work, i dont know where the issue came from.

---

_[View the full topic](https://meta.discourse.org/t/transforming-simple-ruby-files-into-a-ruby-gem/103399)._
