{"id":16301,"date":"2024-09-16T14:09:35","date_gmt":"2024-09-16T21:09:35","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=16301"},"modified":"2024-09-18T15:31:13","modified_gmt":"2024-09-18T22:31:13","slug":"couchbase-ruby-orm-simplifies-development","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/","title":{"rendered":"Introducing the New Couchbase Ruby ORM"},"content":{"rendered":"<h2><span style=\"font-weight: 400;\">A practical guide for Ruby applications<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Ruby remains one of the most popular choices for building scalable applications, and Ruby on Rails continues to be one of the most flexible and robust web frameworks available. Notwithstanding the developer ease with working with Ruby and Ruby on Rails, managing the complexities of data operations can still be challenging, especially when dealing with adaptive and flexible data in non-relational databases like Couchbase. This no longer needs to be challenging though, as there is now the newly released Couchbase Ruby ORM.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The Couchbase Ruby ORM is a tool designed to simplify database interactions and streamline your development process. The Couchbase open source community started this project through the great work of developers at Doctolib, Mapotempo and others. Now, the project has officially been adopted as part of the Couchbase developer tooling ecosystem.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this post, we\u2019ll explore how the ORM can enhance your applications.<\/span><\/p>\n<p style=\"text-align: center;\"><i><span style=\"font-weight: 400;\">tl;dr You can find an entire working Rails application using the new Couchbase Ruby ORM on <\/span><\/i><a href=\"https:\/\/github.com\/hummusonrails\/realworld-couchbase-ruby-orm\"><i><span style=\"font-weight: 400;\">GitHub:<\/span><\/i><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/hummusonrails\/realworld-couchbase-ruby-orm\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-16302 size-large aligncenter\" style=\"border: 1px solid black;\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-1024x825.png\" alt=\"\" width=\"900\" height=\"725\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-1024x825.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-300x242.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-768x619.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-1536x1238.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-2048x1650.png 2048w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/couchbase-ruby-orm-github-1320x1064.png 1320w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s get started!<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">The power of ORMs<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Object Relational Mappers (ORMs) are a fundamental staple in modern web development. They allow developers to interact with a database using objects rather than writing raw database queries. In the case of Ruby applications, that means working with your data as if it were Ruby objects. This abstraction not only simplifies the overall codebase, but enhances readability and maintainability.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Within the context of Couchbase, an ORM is particularly beneficial because it bridges the gap between its document-based storage and the object-oriented nature of Ruby. By using the new Couchbase Ruby ORM, you can leverage many of Couchbase\u2019s features while maintaining the familiar Ruby development experience that we all enjoy.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Benefits of using a Ruby ORM in your applications<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">If you are a Ruby on Rails developer, you are well familiar with the benefits of using ActiveRecord, Rails\u2019 built-in ORM, to manage your data. However, it bears repeating what those benefits precisely are. They can be summarized into four key points:<\/span><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>Ease of Use<\/strong>: Once you can define your data models as Ruby classes and attributes, you make your codebase more intuitive and easier to navigate.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>Data Integrity<\/strong>: Automatically handling data validations and constraints at the model level ensures your data stays the way you intended it to stay. No need to add an additional layer of validation on your data, in more server side middleware or on the client, once the data is being validated directly in the model.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>Enhanced Productivity<\/strong>: Reduce your boilerplate code, allowing you to focus on the business logic rather than getting carried away with database management in your application.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>Consistency<\/strong>: Standardize data access patterns across your application, and by doing so, make your future self and your colleagues happier when you, or they, need to come back and refactor the application weeks or months later.\u00a0<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">With the new Couchbase Ruby ORM you can extend all those benefits to your data on Couchbase, providing a seamless integration between your application and your flexible and adaptive data. In a Rails application context, the ORM extends ActiveRecord functionality, enabling Rails developers to work with Couchbase data using all their familiar methods and conventions.\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">A practical example<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Let\u2019s consider a fictional blogging platform. This platform needs to manage user profiles, comments, tags and content efficiently. The platform manages all sorts of content with different types of data, which is why building with a JSON document database like Couchbase is the way to go.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">How would that look in reality?<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Defining models with the Couchbase ORM<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Let\u2019s start with an <\/span><span style=\"font-weight: 400;\"><code>Article<\/code><\/span><span style=\"font-weight: 400;\"> model:<\/span><\/p>\n<pre class=\"nums:false lang:ruby decode:true\">class Article &lt; CouchbaseOrm::Base\r\n\u00a0\u00a0attribute :slug, :string\r\n\u00a0\u00a0attribute :title, :string\r\n\u00a0\u00a0attribute :description, :string\r\n\u00a0\u00a0attribute :body, :string\r\n\u00a0\u00a0attribute :tag_list, :string\r\n\u00a0\u00a0attribute :created_at, :time\r\n\u00a0\u00a0attribute :updated_at, :time\r\n\u00a0\u00a0attribute :author_id, :string\r\n\u00a0\u00a0attribute :favorites\r\n\u00a0\u00a0attribute :favorites_count, :integer, default: 0\r\n\r\n\u00a0\u00a0view :by_id, emit_key: :id\r\n\u00a0\u00a0view :by_slug, emit_key: :slug\r\n\u00a0\u00a0view :by_author_id, emit_key: :author_id\r\n\u00a0\u00a0view :by_article_id, emit_key: :id\r\n\r\n\u00a0\u00a0validates :slug, presence: true\r\n\u00a0\u00a0validates :title, presence: true\r\n\u00a0\u00a0validates :description, presence: true\r\n\u00a0\u00a0validates :body, presence: true\r\n\u00a0\u00a0validates :tag_list, presence: true\r\n\u00a0\u00a0validates :author_id, presence: true\r\nend<\/pre>\n<p><span style=\"font-weight: 400;\">This model defines an article with various attributes, leveraging Couchbase\u2019s ability to handle diverse data types. The attributes are defined similarly to how they would be in any ActiveRecord usage, making it easy for Ruby developers, and Rails developers in particular, to adopt it.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\"><code>view<\/code><\/span><span style=\"font-weight: 400;\"> statements shown above establish defined ways to query documents stored in Couchbase. Each view is essentially an index that allows you query documents by a specific attribute more efficiently. For example, the <\/span><span style=\"font-weight: 400;\">view <code>:by:slug, emit_key :slug<\/code><\/span><span style=\"font-weight: 400;\"> statement creates a view that indexes articles by their <\/span><span style=\"font-weight: 400;\"><code>slug<\/code><\/span><span style=\"font-weight: 400;\"> attribute. This view allows you to retrieve articles based on their slug.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Defining associations with the Couchbase ORM<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Now, what about associations of data in the blogging platform? The blogging platform needs to ensure that each comment belongs to a specific user and to a specific article. The same way that can be done in a standard Rails model, is how it can be done using the Couchbase Ruby ORM. Here\u2019s how that can be set up:<\/span><\/p>\n<pre class=\"nums:false lang:ruby decode:true\">class Comment &lt; CouchbaseOrm::Base\r\n\u00a0\u00a0belongs_to :user\r\n\u00a0\u00a0belongs_to :article\r\nend<\/pre>\n<p><span style=\"font-weight: 400;\">With those associations, comments belong to both a user and an article. Similarly, you can also define a dependent relationship in the model, too. Take a look again at the <\/span><span style=\"font-weight: 400;\"><code>Article<\/code><\/span><span style=\"font-weight: 400;\"> class to see this in action:<\/span><\/p>\n<pre class=\"nums:false lang:ruby decode:true\">class Article &lt; CouchbaseOrm::Base\r\n\u00a0\u00a0belongs_to :user\r\n\u00a0\u00a0has_many :comments, dependent: :destroy\r\nend\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">The same way that we demonstrated creating attributes on data models and defining associations, the ORM similarly provides functionality for querying, creating custom SQL++ queries, working with nested documents and a lot more. <\/span><a href=\"https:\/\/couchbase-ruby-orm.com\/\"><span style=\"font-weight: 400;\">The documentation<\/span><\/a><span style=\"font-weight: 400;\"> provides a rich array of example code for all the possible scenarios you may need to work with.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Wrapping up<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The new Couchbase Ruby ORM brings powerful and flexible database management to Ruby, and to Ruby on Rails applications. By abstracting any of the complexities of Couchbase\u2019s document-oriented design, it enables developers to build scalable and maintainable applications with ease. No matter what the nature of the application is, from an ecommerce platform to a blogging content management system, the Couchbase ORM offers a robust solution for integrating Couchbase within your Ruby stack. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Try it out yourself and experience the benefits!\u00a0<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/github.com\/hummusonrails\/realworld-couchbase-ruby-orm\">Couchbase Ruby ORM tutorial on GitHub<\/a><\/li>\n<li><a href=\"https:\/\/cloud.couchbase.com\">Use Couchbase Capella DBaaS for free<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A practical guide for Ruby applications Ruby remains one of the most popular choices for building scalable applications, and Ruby on Rails continues to be one of the most flexible and robust web frameworks available. Notwithstanding the developer ease with [&hellip;]<\/p>\n","protected":false},"author":85356,"featured_media":16303,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1814,1815,2242,2225,9407,2201],"tags":[],"ppma_author":[9985],"class_list":["post-16301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-best-practices-and-tutorials","category-connectors","category-cloud","category-ruby","category-tools-sdks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Introducing the New Couchbase Ruby ORM - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"The Couchbase Ruby ORM simplifies data management for Ruby &amp; Ruby on Rails apps, bridging document-based storage with Ruby&#039;s object-oriented approach.\" \/>\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.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing the New Couchbase Ruby ORM\" \/>\n<meta property=\"og:description\" content=\"The Couchbase Ruby ORM simplifies data management for Ruby &amp; Ruby on Rails apps, bridging document-based storage with Ruby&#039;s object-oriented approach.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-16T21:09:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-18T22:31:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1256\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ben Greenberg, Senior Developer Evangelist\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ben Greenberg, Senior Developer Evangelist\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/\"},\"author\":{\"name\":\"Ben Greenberg, Senior Developer Evangelist\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/48efa1524aec97312d92f65a270c255d\"},\"headline\":\"Introducing the New Couchbase Ruby ORM\",\"datePublished\":\"2024-09-16T21:09:35+00:00\",\"dateModified\":\"2024-09-18T22:31:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/\"},\"wordCount\":959,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/09\\\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg\",\"articleSection\":[\"Application Design\",\"Best Practices and Tutorials\",\"Connectors\",\"Couchbase Capella\",\"Ruby\",\"Tools &amp; SDKs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/\",\"name\":\"Introducing the New Couchbase Ruby ORM - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/09\\\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg\",\"datePublished\":\"2024-09-16T21:09:35+00:00\",\"dateModified\":\"2024-09-18T22:31:13+00:00\",\"description\":\"The Couchbase Ruby ORM simplifies data management for Ruby & Ruby on Rails apps, bridging document-based storage with Ruby's object-oriented approach.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/09\\\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/09\\\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg\",\"width\":2400,\"height\":1256},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-ruby-orm-simplifies-development\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing the New Couchbase Ruby ORM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/48efa1524aec97312d92f65a270c255d\",\"name\":\"Ben Greenberg, Senior Developer Evangelist\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/06\\\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpegc9bda12524045d12a5878a2ef3fbe0de\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/06\\\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2024\\\/06\\\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpeg\",\"caption\":\"Ben Greenberg, Senior Developer Evangelist\"},\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/bengreenberg\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introducing the New Couchbase Ruby ORM - The Couchbase Blog","description":"The Couchbase Ruby ORM simplifies data management for Ruby & Ruby on Rails apps, bridging document-based storage with Ruby's object-oriented approach.","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.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/","og_locale":"en_US","og_type":"article","og_title":"Introducing the New Couchbase Ruby ORM","og_description":"The Couchbase Ruby ORM simplifies data management for Ruby & Ruby on Rails apps, bridging document-based storage with Ruby's object-oriented approach.","og_url":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/","og_site_name":"The Couchbase Blog","article_published_time":"2024-09-16T21:09:35+00:00","article_modified_time":"2024-09-18T22:31:13+00:00","og_image":[{"width":2400,"height":1256,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg","type":"image\/jpeg"}],"author":"Ben Greenberg, Senior Developer Evangelist","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ben Greenberg, Senior Developer Evangelist","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/"},"author":{"name":"Ben Greenberg, Senior Developer Evangelist","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/48efa1524aec97312d92f65a270c255d"},"headline":"Introducing the New Couchbase Ruby ORM","datePublished":"2024-09-16T21:09:35+00:00","dateModified":"2024-09-18T22:31:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/"},"wordCount":959,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg","articleSection":["Application Design","Best Practices and Tutorials","Connectors","Couchbase Capella","Ruby","Tools &amp; SDKs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/","name":"Introducing the New Couchbase Ruby ORM - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg","datePublished":"2024-09-16T21:09:35+00:00","dateModified":"2024-09-18T22:31:13+00:00","description":"The Couchbase Ruby ORM simplifies data management for Ruby & Ruby on Rails apps, bridging document-based storage with Ruby's object-oriented approach.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/09\/Introducing-the-Ruby-Couchbase-ORM_NEW.jpg","width":2400,"height":1256},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-ruby-orm-simplifies-development\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introducing the New Couchbase Ruby ORM"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/48efa1524aec97312d92f65a270c255d","name":"Ben Greenberg, Senior Developer Evangelist","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/06\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpegc9bda12524045d12a5878a2ef3fbe0de","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/06\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpeg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/06\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpeg","caption":"Ben Greenberg, Senior Developer Evangelist"},"url":"https:\/\/www.couchbase.com\/blog\/author\/bengreenberg\/"}]}},"acf":[],"authors":[{"term_id":9985,"user_id":85356,"is_guest":0,"slug":"bengreenberg","display_name":"Ben Greenberg, Senior Developer Evangelist","avatar_url":{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/06\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpeg","url2x":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/06\/T024FJS4M-U075H3NTJUR-b4c321d902e2-512.jpeg"},"0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/16301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/85356"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=16301"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/16301\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/16303"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=16301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=16301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=16301"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=16301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}