{"id":8535,"date":"2016-07-12T10:55:57","date_gmt":"2016-07-12T10:55:57","guid":{"rendered":"https:\/\/dev.railscarma.com\/step-step-guide-building-first-ruby-gem\/"},"modified":"2024-01-10T13:11:43","modified_gmt":"2024-01-10T13:11:43","slug":"steg-steg-guide-bygga-forsta-rubin-parla","status":"publish","type":"post","link":"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/steg-steg-guide-bygga-forsta-rubin-parla\/","title":{"rendered":"Steg-f\u00f6r-steg-guide f\u00f6r att bygga din f\u00f6rsta rubinp\u00e4rla"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"8535\" class=\"elementor elementor-8535\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5f857a0a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5f857a0a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4b62f0ae\" data-id=\"4b62f0ae\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4a86742a elementor-widget elementor-widget-text-editor\" data-id=\"4a86742a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Nuf\u00f6rtiden \u00e4r alla funktioner i Rails byggda som Ruby-\u00e4delstenar. Till exempel kan vi anv\u00e4nda devise gem f\u00f6r autentiseringsdelen av applikationen. Det \u00e4r som ett paket eller bibliotek som \u00e4r skrivet i Ruby programmeringsspr\u00e5k. Dessutom kan den importeras och anv\u00e4ndas av andra i deras program.<\/p>\n<p><strong>Steg 1<\/strong><br>\nBundler is like a dependency management tool for Ruby, which is also used by Rails. We will use Bundler for the basic gem structure. It helps us to install the correct versions of the gem and forces us to use the same in the application. So the command for that is, gem bundler install<br>\nAfter bundling, we should specify the gem \u201cname\u201d that we are going to create i.e. Bundle gem \u201ctestgem\u201d will create a repository shown below<\/p>\n<p><a href=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2024\/01\/ruby-gem.png\"><img decoding=\"async\" class=\"aligncenter wp-image-8536 size-full\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2024\/01\/ruby-gem.png\" alt=\"rubin p\u00e4rla\" width=\"1298\" height=\"535\"><\/a><br>\nS\u00e5 i detta kan vi se den grundl\u00e4ggande \u00e4delstensstrukturen. Under mappen lib kommer versionsfilen att anv\u00e4ndas f\u00f6r att n\u00e4mna versionen av Gem. Vi kan redigera versionen efter v\u00e5r bekv\u00e4mlighet och sl\u00e4ppa den som kommer att vara versionen i Rubygems.<\/p>\n<p><a href=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2024\/01\/rubygem.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8537\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2024\/01\/rubygem.png\" alt=\"rubygem\" width=\"779\" height=\"361\"><\/a><\/p>\n<p><strong>Steg 2<\/strong><br>\nVi kommer att \u00f6verv\u00e4ga testgem.gemspec, med testgem som namnet p\u00e5 den p\u00e4rla som vi kommer att skapa f\u00f6r prov. Den kommer att anv\u00e4ndas f\u00f6r att st\u00e4lla in \u00e4delstenen p\u00e5 rubgems, till exempel namn p\u00e5 \u00e4delstenen, sammanfattning, beskrivning, filer som kr\u00e4vs i detta projekt, testfiler som anv\u00e4nds f\u00f6r att testa filerna i projektet etc.<\/p>\n<p><a href=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2024\/01\/ruby-gem-1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-8538\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2024\/01\/ruby-gem-1.png\" alt=\"rubin p\u00e4rla 1\" width=\"1192\" height=\"620\"><\/a><br>\n<strong>Rake fil:<\/strong> &#8211; This makes releasing the new versions of the gem, and also helps other developers to check the test cases if they are going to modify the particular gem.<br>\nAfter the rake, we should create a test folder and test cases for each segments will be included here in the app directory.<\/p>\n<p><strong>Steg 3<\/strong><br>\nPlanning to make a rubygem, then we need to analyse the requirements what to build up and what all functionalities should be included in that.<br>\nWhile generating, we should create a sample.rb file inside lib folder and create own class with namespace because the other plugin has also the same classes then it will get conflict in the names. And require the sample.rb file in the testgem.rb file like reqiure \u201ctestgem\/sample\u201d.<\/p>\n<p><strong>Steg 4<\/strong><br>\nWe have require &#8220;bundler\/gem_tasks\u201d in rake file so when we run rake release, it will release the gem to ruby gems and make it available. Push to git repository<\/p>\n<p>RubyGems are commonly used in Applications<br>\n1) Rails \u2013 Rails is a ruby gem<br>\n2) Better Errors \/ Rails Footnotes &#8211; Debugging tools for Rails\/Rack apps.<br>\n3) Resque \/ Delayed Job \/ Sidekiq \u2013 Used for creating background jobs, placing them on multiple queues, and processing them later.<br>\n4) Cancan \/ Devise \u2013 Authorization \/ Authentication Gems for Ruby on Rails.<br>\n5) Letter Opener &#8211; Test your emails within the browser itself.<br>\n6) Discourse &#8211; Discussion Forum.<br>\n7) Carrierwave \/ Paperclip &#8211; Classy solutions for file uploads for Rails.<br>\n8) Whenever &#8211; Cron jobs (scheduled tasks) in Ruby.<br>\n9) Thin \/ Unicorn \/ Puma &#8211; Web servers.<\/p>\n<p>RailsCarma provide end to end Ruby on Rails Development services including, consulting, architecture, building, management and extension to companies around the globe. You can also hire <a href=\"https:\/\/www.railscarma.com\/sv\/hyra-ruby-on-rails-utvecklare\/\">Ruby on Rails utvecklare<\/a> med en l\u00e4ttanst\u00e4lld process.&nbsp;<a href=\"\/sv\/contact\/\">Kontakta oss f\u00f6r att veta mer<\/a>.&nbsp;<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-66f83338 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"66f83338\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-46924126\" data-id=\"46924126\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-63e892c elementor-widget elementor-widget-heading\" data-id=\"63e892c\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Prenumerera f\u00f6r de senaste uppdateringarna<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1a687f4e elementor-widget elementor-widget-shortcode\" data-id=\"1a687f4e\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\t\t\t\t\t<script type=\"text\/javascript\">\n\t\t\t\t\t\tvar gCaptchaSibWidget;\n                        var onloadSibCallbackInvisible = function () {\n\n                            var element = document.getElementsByClassName('sib-default-btn');\n                            var countInvisible = 0;\n                            var indexArray = [];\n                            jQuery('.sib-default-btn').each(function (index, el) {\n                                if ((jQuery(el).attr('id') == \"invisible\")) {\n                                    indexArray[countInvisible] = index;\n                                    countInvisible++\n                                }\n                            });\n\n                            jQuery('.invi-recaptcha').each(function (index, el) {\n                                grecaptcha.render(element[indexArray[index]], {\n                                    'sitekey': jQuery(el).attr('data-sitekey'),\n                                    'callback': sibVerifyCallback,\n                                });\n                            });\n                        };\n\t\t\t\t\t<\/script>\n\t\t\t\t\t                <script src=\"https:\/\/www.google.com\/recaptcha\/api.js?onload=onloadSibCallbackInvisible&render=explicit\" async defer><\/script>\n\t\t\t\t\n\t\t\t<form id=\"sib_signup_form_1\" method=\"post\" class=\"sib_signup_form\" action=\"\">\n\t\t\t\t<div class=\"sib_loader\" style=\"display:none;\"><img\n\t\t\t\t\t\t\tsrc=\"https:\/\/www.railscarma.com\/wp-includes\/images\/spinner.gif\" alt=\"lastare\"><\/div>\n\t\t\t\t<input type=\"hidden\" name=\"sib_form_action\" value=\"subscribe_form_submit\">\n\t\t\t\t<input type=\"hidden\" name=\"sib_form_id\" value=\"1\">\n                <input type=\"hidden\" name=\"sib_form_alert_notice\" value=\"Please fill out this field\">\n                <input type=\"hidden\" name=\"sib_form_invalid_email_notice\" value=\"Your email address is invalid\">\n                <input type=\"hidden\" name=\"sib_security\" value=\"d7f7626ab9\">\n\t\t\t\t<div class=\"sib_signup_box_inside_1\">\n\t\t\t\t\t<div style=\"\/*display:none*\/\" class=\"sib_msg_disp\">\n\t\t\t\t\t<\/div>\n                                            <div id=\"sib_captcha_invisible\" class=\"invi-recaptcha\" data-sitekey=\"6LdikOAaAAAAAJ6SWrrKVQrtw7TQpQAEnv0HS0G3\"><\/div>\n                    \t\t\t\t\t<p class=\"sib-email-area\">\r\n    <label class=\"sib-email-area\"><\/label>\r\n    <input type=\"email\" class=\"sib-email-area\" name=\"email\" required=\"required\" placeholder=\"E-postadress\">\r\n<\/p>\r\n<p class=\"sib-NAME-area\">\r\n    <label class=\"sib-NAME-area\"><\/label>\r\n    <input type=\"text\" class=\"sib-NAME-area\" name=\"NAME\" placeholder=\"namn\">\r\n<\/p>\r\n<p>\r\n    <input type=\"submit\" id=\"invisible\" class=\"sib-default-btn\" value=\"Prenumerera\">\r\n<\/p>\t\t\t\t<\/div>\n\t\t\t<input type=\"hidden\" name=\"trp-form-language\" value=\"sv\"\/><\/form>\n\t\t\t<style>\n\t\t\t\tform#sib_signup_form_1 p.sib-alert-message {\n    padding: 6px 12px;\n    margin-bottom: 20px;\n    border: 1px solid transparent;\n    border-radius: 4px;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n}\nform#sib_signup_form_1 p.sib-alert-message-error {\n    background-color: #f2dede;\n    border-color: #ebccd1;\n    color: #a94442;\n}\nform#sib_signup_form_1 p.sib-alert-message-success {\n    background-color: #dff0d8;\n    border-color: #d6e9c6;\n    color: #3c763d;\n}\nform#sib_signup_form_1 p.sib-alert-message-warning {\n    background-color: #fcf8e3;\n    border-color: #faebcc;\n    color: #8a6d3b;\n}\n\t\t\t<\/style>\n\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t  <div class=\"related-post slider\">\r\n        <div class=\"headline\">relaterade inl\u00e4gg<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Kaminari Gem\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/kaminari-parla\/?related_post_from=37277\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2023\/04\/kaminari-gem.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"kaminari p\u00e4rla\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2023\/04\/kaminari-gem.jpg 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2023\/04\/kaminari-gem-300x113.jpg 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2023\/04\/kaminari-gem-768x288.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Kaminari Gem\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/kaminari-parla\/?related_post_from=37277\">\r\n        Kaminari Gem  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Varf\u00f6r anst\u00e4lla Ruby on Rails-utvecklare 2026?\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ror\/varfor-anlita-utvecklare-av-ruby-on-rails\/?related_post_from=30627\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2019\/01\/why-to-hire-ruby-on-rails-developers-in-2022.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"varf\u00f6r anlita utvecklare av ruby on rails 2022\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2019\/01\/why-to-hire-ruby-on-rails-developers-in-2022.jpg 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2019\/01\/why-to-hire-ruby-on-rails-developers-in-2022-300x113.jpg 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2019\/01\/why-to-hire-ruby-on-rails-developers-in-2022-768x288.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Varf\u00f6r anst\u00e4lla Ruby on Rails-utvecklare 2026?\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ror\/varfor-anlita-utvecklare-av-ruby-on-rails\/?related_post_from=30627\">\r\n        Varf\u00f6r anst\u00e4lla Ruby on Rails-utvecklare 2026?  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Betydelsen av mjukvaruarkitektur vid utveckling av f\u00f6retagsmjukvara\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ror\/vikten-av-mjukvaruarkitektur-i-foretagsutveckling-av-programvara\/?related_post_from=36250\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/06\/Importance-of-Software-Architecture-in-enterprise-software-development.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"Betydelsen av mjukvaruarkitektur vid utveckling av f\u00f6retagsmjukvara\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/06\/Importance-of-Software-Architecture-in-enterprise-software-development.jpg 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/06\/Importance-of-Software-Architecture-in-enterprise-software-development-300x113.jpg 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/06\/Importance-of-Software-Architecture-in-enterprise-software-development-768x288.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Betydelsen av mjukvaruarkitektur vid utveckling av f\u00f6retagsmjukvara\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ror\/vikten-av-mjukvaruarkitektur-i-foretagsutveckling-av-programvara\/?related_post_from=36250\">\r\n        Betydelsen av mjukvaruarkitektur vid utveckling av f\u00f6retagsmjukvara  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Ruby IDE: De b\u00e4sta IDE:erna f\u00f6r Ruby on Rails Development\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ror\/ruby-ide-de-basta-ideerna-for-ruby-on-rails-utveckling\/?related_post_from=36125\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/01\/BEST-IDES-FOR-RUBY-ON-RAILS-DEVELOPMENT.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"B\u00c4STA ID\u00c9ER F\u00d6R UTVECKLING AV RUBY ON RAIL\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/01\/BEST-IDES-FOR-RUBY-ON-RAILS-DEVELOPMENT.jpg 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/01\/BEST-IDES-FOR-RUBY-ON-RAILS-DEVELOPMENT-300x113.jpg 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2022\/01\/BEST-IDES-FOR-RUBY-ON-RAILS-DEVELOPMENT-768x288.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Ruby IDE: De b\u00e4sta IDE:erna f\u00f6r Ruby on Rails Development\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ror\/ruby-ide-de-basta-ideerna-for-ruby-on-rails-utveckling\/?related_post_from=36125\">\r\n        Ruby IDE: De b\u00e4sta IDE:erna f\u00f6r Ruby on Rails Development  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 10px;\r\n      padding: 10px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 14px !important;\r\n      color: #999999 !important;\r\n          }\r\n\r\n    .related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 14px;\r\n      color: #000000;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 12px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 2,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 2,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: false,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: false,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>","protected":false},"excerpt":{"rendered":"<p>Nowadays all the functionalities in Rails are built as Ruby gems. For example we can use devise gem for the authentication part of the application. It&#8217;s like a package or library that is written in Ruby programming language. Moreover it can be imported and used by others in their programs. Step 1 Bundler is like &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/ruby-regex-match-guide-with-examples\/\"> <span class=\"screen-reader-text\">Ruby Regex Match Guide (2026) med exempel<\/span> L\u00e4s mer \u00bb<\/a><\/p>","protected":false},"author":1,"featured_media":31888,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[384],"tags":[],"class_list":["post-8535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-articles"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Step-By-Step Guide to Building Your First Ruby Gem | Ruby Gems<\/title>\n<meta name=\"description\" content=\"Nowadays all the functionalities in Rails are built as Ruby gems. For example we can use devise gem for the authentication.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/steg-steg-guide-bygga-forsta-rubin-parla\/\" \/>\n<meta property=\"og:locale\" content=\"sv_SE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Step-By-Step Guide to Building Your First Ruby Gem | Ruby Gems\" \/>\n<meta property=\"og:description\" content=\"Nowadays all the functionalities in Rails are built as Ruby gems. For example we can use devise gem for the authentication.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/steg-steg-guide-bygga-forsta-rubin-parla\/\" \/>\n<meta property=\"og:site_name\" content=\"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RailsCarma\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-12T10:55:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-10T13:11:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@railscarma\" \/>\n<meta name=\"twitter:site\" content=\"@railscarma\" \/>\n<meta name=\"twitter:label1\" content=\"Skriven av\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Ber\u00e4knad l\u00e4stid\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minuter\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/5f2228a2dec7549056e709de6eb85d21\"},\"headline\":\"Step-By-Step Guide to Building Your First Ruby Gem\",\"datePublished\":\"2016-07-12T10:55:57+00:00\",\"dateModified\":\"2024-01-10T13:11:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/\"},\"wordCount\":544,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png\",\"articleSection\":[\"Technical Articles\"],\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/\",\"url\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/\",\"name\":\"Step-By-Step Guide to Building Your First Ruby Gem | Ruby Gems\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png\",\"datePublished\":\"2016-07-12T10:55:57+00:00\",\"dateModified\":\"2024-01-10T13:11:43+00:00\",\"description\":\"Nowadays all the functionalities in Rails are built as Ruby gems. For example we can use devise gem for the authentication.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#breadcrumb\"},\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png\",\"width\":800,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.railscarma.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Step-By-Step Guide to Building Your First Ruby Gem\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.railscarma.com\/#website\",\"url\":\"https:\/\/www.railscarma.com\/\",\"name\":\"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\",\"description\":\"RailsCarma is a Ruby on Rails Development Company in Bangalore. We specialize in Offshore Ruby on Rails Development based out in USA and India. Hire experienced Ruby on Rails developers for the ultimate Web Experience.\",\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.railscarma.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sv-SE\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.railscarma.com\/#organization\",\"name\":\"RailsCarma\",\"url\":\"https:\/\/www.railscarma.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png\",\"width\":200,\"height\":46,\"caption\":\"RailsCarma\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RailsCarma\/\",\"https:\/\/x.com\/railscarma\",\"https:\/\/www.linkedin.com\/company\/railscarma\/\",\"https:\/\/myspace.com\/railscarma\",\"https:\/\/in.pinterest.com\/railscarma\/\",\"https:\/\/www.youtube.com\/channel\/UCx3Wil-aAnDARuatTEyMdpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/5f2228a2dec7549056e709de6eb85d21\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/308867ca6c81f3aba146080c601000087180326f752c4116849ea9f514c6a4fa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/308867ca6c81f3aba146080c601000087180326f752c4116849ea9f514c6a4fa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/www.railscarma.com\/hire-ruby-on-rails-developer\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Steg-f\u00f6r-steg-guide f\u00f6r att bygga din f\u00f6rsta rubinp\u00e4rla | Ruby Gems","description":"Nuf\u00f6rtiden \u00e4r alla funktioner i Rails byggda som Ruby-\u00e4delstenar. Till exempel kan vi anv\u00e4nda devise gem f\u00f6r autentiseringen.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/steg-steg-guide-bygga-forsta-rubin-parla\/","og_locale":"sv_SE","og_type":"article","og_title":"Step-By-Step Guide to Building Your First Ruby Gem | Ruby Gems","og_description":"Nowadays all the functionalities in Rails are built as Ruby gems. For example we can use devise gem for the authentication.","og_url":"https:\/\/www.railscarma.com\/sv\/blogg\/tekniska-artiklar\/steg-steg-guide-bygga-forsta-rubin-parla\/","og_site_name":"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","article_publisher":"https:\/\/www.facebook.com\/RailsCarma\/","article_published_time":"2016-07-12T10:55:57+00:00","article_modified_time":"2024-01-10T13:11:43+00:00","og_image":[{"width":800,"height":300,"url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@railscarma","twitter_site":"@railscarma","twitter_misc":{"Skriven av":"admin","Ber\u00e4knad l\u00e4stid":"3 minuter"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#article","isPartOf":{"@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/"},"author":{"name":"admin","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/5f2228a2dec7549056e709de6eb85d21"},"headline":"Step-By-Step Guide to Building Your First Ruby Gem","datePublished":"2016-07-12T10:55:57+00:00","dateModified":"2024-01-10T13:11:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/"},"wordCount":544,"commentCount":0,"publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"image":{"@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png","articleSection":["Technical Articles"],"inLanguage":"sv-SE","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/","url":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/","name":"Steg-f\u00f6r-steg-guide f\u00f6r att bygga din f\u00f6rsta rubinp\u00e4rla | Ruby Gems","isPartOf":{"@id":"https:\/\/www.railscarma.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage"},"image":{"@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png","datePublished":"2016-07-12T10:55:57+00:00","dateModified":"2024-01-10T13:11:43+00:00","description":"Nuf\u00f6rtiden \u00e4r alla funktioner i Rails byggda som Ruby-\u00e4delstenar. Till exempel kan vi anv\u00e4nda devise gem f\u00f6r autentiseringen.","breadcrumb":{"@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#breadcrumb"},"inLanguage":"sv-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/"]}]},{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#primaryimage","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2016\/07\/Step-By-Step-Guide-to-Building-Your-First-Ruby-Gem.png","width":800,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/www.railscarma.com\/es\/blog\/technical-articles\/guia-paso-a-paso-construyendo-la-primera-gema-rubi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.railscarma.com\/"},{"@type":"ListItem","position":2,"name":"Step-By-Step Guide to Building Your First Ruby Gem"}]},{"@type":"WebSite","@id":"https:\/\/www.railscarma.com\/#website","url":"https:\/\/www.railscarma.com\/","name":"RailsCarma - Ruby on Rails Development Company specialiserat p\u00e5 Offshore Development","description":"RailsCarma \u00e4r ett Ruby on Rails Development Company i Bangalore. Vi \u00e4r specialiserade p\u00e5 Offshore Ruby on Rails Development baserat i USA och Indien. Anst\u00e4ll erfarna Ruby on Rails-utvecklare f\u00f6r den ultimata webbupplevelsen.","publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.railscarma.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sv-SE"},{"@type":"Organization","@id":"https:\/\/www.railscarma.com\/#organization","name":"RailsCarma","url":"https:\/\/www.railscarma.com\/","logo":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png","width":200,"height":46,"caption":"RailsCarma"},"image":{"@id":"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RailsCarma\/","https:\/\/x.com\/railscarma","https:\/\/www.linkedin.com\/company\/railscarma\/","https:\/\/myspace.com\/railscarma","https:\/\/in.pinterest.com\/railscarma\/","https:\/\/www.youtube.com\/channel\/UCx3Wil-aAnDARuatTEyMdpg"]},{"@type":"Person","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/5f2228a2dec7549056e709de6eb85d21","name":"administration","image":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/308867ca6c81f3aba146080c601000087180326f752c4116849ea9f514c6a4fa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/308867ca6c81f3aba146080c601000087180326f752c4116849ea9f514c6a4fa?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/www.railscarma.com\/hire-ruby-on-rails-developer\/"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/posts\/8535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/comments?post=8535"}],"version-history":[{"count":0,"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/posts\/8535\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/media\/31888"}],"wp:attachment":[{"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/media?parent=8535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/categories?post=8535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.railscarma.com\/sv\/wp-json\/wp\/v2\/tags?post=8535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}