{"id":40177,"date":"2025-10-13T07:34:49","date_gmt":"2025-10-13T07:34:49","guid":{"rendered":"https:\/\/www.railscarma.com\/?p=40177"},"modified":"2025-10-13T07:34:52","modified_gmt":"2025-10-13T07:34:52","slug":"how-to-raise-and-rescue-exceptions-in-ruby","status":"publish","type":"post","link":"https:\/\/www.railscarma.com\/es\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/","title":{"rendered":"C\u00f3mo lanzar y rescatar excepciones en Ruby"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"40177\" class=\"elementor elementor-40177\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-feaac73 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"feaac73\" 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-57be5f1\" data-id=\"57be5f1\" 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-f81e029 elementor-widget elementor-widget-text-editor\" data-id=\"f81e029\" 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><span style=\"font-weight: 400;\">Exceptions are a fundamental part of programming in Ruby, allowing developers to handle errors gracefully and ensure robust, fault-tolerant applications. Ruby\u2019s exception-handling mechanism is intuitive yet powerful, enabling developers to raise errors when something goes wrong and rescue them to prevent application crashes. In this 2000-word guide, we\u2019ll explore how to raise and rescue exceptions in Ruby, covering the basics, advanced techniques, best practices, and real-world examples.<\/span><\/p><h3><strong>What Are Exceptions in Ruby?<\/strong><\/h3><p>Exceptions in Ruby are objects that represent errors or unexpected conditions during program execution. When an error occurs\u2014such as attempting to divide by zero, accessing a nonexistent file, or encountering a network failure\u2014Ruby raises an exception. If not handled, the exception causes the program to terminate with an error message.<\/p><p>Ruby\u2019s exception system is built around the <code>Exception<\/code> class, which serves as the root of the exception hierarchy. Subclasses like <code>StandardError, RuntimeError, ArgumentError<\/code>, y <code>NoMethodError<\/code> handle specific types of errors. Developers can also define custom exception classes to represent application-specific errors.<\/p><p>Exception handling in Ruby revolves around two key actions:<\/p><ul><li><strong>Raising<\/strong>: Triggering an exception when an error occurs.<\/li><li><strong>Rescuing<\/strong>: Catching and handling exceptions to prevent program crashes.<\/li><\/ul><p>Let\u2019s dive into how to raise and rescue exceptions effectively.<\/p><h3><strong>Raising Exceptions in Ruby<\/strong><\/h3><p>Raising an exception is the process of signaling that an error or unexpected condition has occurred. Ruby provides the <code>raise<\/code> method (and its alias <code>fail<\/code>) to trigger exceptions.<\/p><h4><strong>En <\/strong><code>raise<\/code><strong> M\u00e9todo<\/strong><\/h4><p>The simplest way to raise an exception is to use the <code>raise<\/code> method with no arguments, which raises a <code>RuntimeError<\/code> (a subclass of <code>StandardError<\/code>):<\/p><pre>ruby\nraise\n# =&gt; RuntimeError: unhandled exception<\/pre><p>You can also provide an error message:<\/p><pre>ruby\nraise \"Something went wrong!\"\n# =&gt; RuntimeError: Something went wrong!<\/pre><p>To raise a specific exception class, pass the class as the first argument and the message as the second:<\/p><pre>ruby\nraise ArgumentError, \"Invalid input provided\"\n# =&gt; ArgumentError: Invalid input provided<\/pre><h3><strong>Custom Exception Classes<\/strong><\/h3><p>For more complex applications, you may want to define custom exception classes to represent specific errors. Custom exceptions inherit from <code>StandardError<\/code> or one of its subclasses to ensure compatibility with Ruby\u2019s default rescue behavior.<\/p><p>Ejemplo:<\/p><pre>ruby\nclass AuthenticationError &lt; StandardError; end\n\ndef login(username, password)\n  raise AuthenticationError, \"Invalid credentials\" unless valid_credentials?(username, password)\n  puts \"Login successful!\"\nend\n\ndef valid_credentials?(username, password)\n  username == \"admin\" &amp;&amp; password == \"secret\"\nend\n\nlogin(\"user\", \"wrong\") # =&gt; AuthenticationError: Invalid credentials<\/pre><p>By defining <code>AuthenticationError<\/code>, you can handle authentication-related errors separately from generic errors.<\/p><h3><strong>Raising Exceptions with Cause<\/strong><\/h3><p>Ruby allows you to attach a &#8220;cause&#8221; to an exception, which is useful for debugging. The cause is the original exception that led to the current one. Use the <code>exception<\/code> method to access it:<\/p><pre>ruby\nbegin\n  raise \"Original error\"\nrescue =&gt; e\n  raise \"New error\" # The original error is preserved as the cause\nend<\/pre><p>You can inspect the cause with <code>e.cause<\/code>:<\/p><pre>ruby\nbegin\n  begin\n \u00a0\u00a0 raise \"Original error\"\n  rescue =&gt; e\n \u00a0\u00a0 raise \"New error\"\n  end\nrescue =&gt; e\n  puts e.message\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # =&gt; New error\n  puts e.cause.message # =&gt; Original error\nend<\/pre><h3><strong>Rescuing Exceptions<\/strong><\/h3><p>Rescuing exceptions allows you to catch and handle errors gracefully, preventing your program from crashing. Ruby uses the <code>begin\/rescue<\/code> block to manage exceptions.<\/p><h4><strong>En <\/strong><code>comenzar<\/code><strong>\/<\/strong><code>rescue<\/code><strong> Block<\/strong><\/h4><p>The basic structure of a <code>begin\/rescue<\/code> block is:<\/p><pre>ruby\nbegin\n  # Code that might raise an exception\nrescue\n  # Handle the exception\nend<\/pre><p><strong>Ejemplo:<\/strong><\/p><pre>ruby\nbegin\n  result = 10 \/ 0\nrescue\n  puts \"An error occurred!\"\nend\n# Output: An error occurred!<\/pre><p>Por defecto, <code>rescue<\/code> catches <code>StandardError<\/code> and its subclasses. If you don\u2019t specify an exception class, it\u2019s equivalent to <code>rescue StandardError<\/code>.<\/p><h3><strong>Handling Specific Exceptions<\/strong><\/h3><p>To handle specific exceptions, specify the exception class in the <code>rescue<\/code> clause:<\/p><pre>ruby\nbegin\n  result = 10 \/ 0\nrescue ZeroDivisionError\n  puts \"Cannot divide by zero!\"\nrescue ArgumentError\n  puts \"Invalid argument provided!\"\nend\n# Output: Cannot divide by zero!<\/pre><p>You can also capture the exception object for further inspection:<\/p><pre>ruby\nbegin\n  raise ArgumentError, \"Invalid input\"\nrescue ArgumentError =&gt; e\n  puts \"Error: #{e.message}\"\nend\n# Output: Error: Invalid input<\/pre><h3><strong>Utilizando <\/strong><code>dem\u00e1s<\/code><strong> y <\/strong><code>ensure<\/code><\/h3><p>Ruby provides two additional clauses for exception handling:<\/p><ul><li><code>dem\u00e1s<\/code>: Executes if no exception is raised.<\/li><li><code>ensure<\/code>: Executes regardless of whether an exception occurs, useful for cleanup tasks.<\/li><\/ul><p>Ejemplo:<\/p><pre>ruby\nbegin\n  puts \"Performing operation...\"\n  result = 10 \/ 2\nrescue ZeroDivisionError\n  puts \"Cannot divide by zero!\"\nelse\n  puts \"Operation successful: #{result}\"\nensure\n  puts \"Cleaning up...\"\nend\n# Output:\n# Performing operation...\n# Operation successful: 5\n# Cleaning up...<\/pre><p>If an exception occurs:<\/p><pre>ruby\nbegin\n  puts \"Performing operation...\"\n  result = 10 \/ 0\nrescue ZeroDivisionError\n  puts \"Cannot divide by zero!\"\nelse\n  puts \"Operation successful: #{result}\"\nensure\n  puts \"Cleaning up...\"\nend\n# Output:\n# Performing operation...\n# Cannot divide by zero!\n# Cleaning up...<\/pre><h3><strong>En <\/strong><code>retry<\/code><strong> Keyword<\/strong><\/h3><p>En <code>retry<\/code> keyword allows you to retry the <code>comenzar<\/code> block after an exception is caught. This is useful for scenarios like retrying failed network requests.<\/p><p>Ejemplo:<\/p><pre>ruby\nattempts = 0\nbegin\n  attempts += 1\n  puts \"Attempt #{attempts}\"\n  raise \"Connection failed\"\nrescue\n  retry if attempts &lt; 3\n  puts \"Giving up after #{attempts} attempts\"\nend\n# Output:\n# Attempt 1\n# Attempt 2\n# Attempt 3\n# Giving up after 3 attempts<\/pre><p>Use retry cautiously to avoid infinite loops.<\/p><h3><strong>Best Practices for Exception Handling<\/strong><\/h3><ol><li><strong>Rescue Specific Exceptions<\/strong>: Avoid bare <code>rescue<\/code> clauses, as they catch all <code>StandardError<\/code> subclasses and can hide unexpected errors. Specify the exact exceptions you expect.<pre>ruby\n# Bad\nbegin\n  # Code\nrescue\n  # Catches everything\nend\n\n# Good\nbegin\n  # Code\nrescue ArgumentError, TypeError\n  # Handle specific errors\nend<\/pre><\/li><li><strong>Keep Rescue Blocks Small<\/strong>: Only wrap the code that might raise an exception. This improves readability and prevents catching unrelated errors.<\/li><li><strong>Provide Meaningful Error Messages<\/strong>: When raising exceptions, include clear, actionable messages to aid debugging.<\/li><li><strong>Use Custom Exceptions for Domain Logic<\/strong>: Create custom exception classes for application-specific errors to make your code more expressive and maintainable.<\/li><li><strong>Avoid Overusing Exceptions for Flow Control<\/strong>: Exceptions are for exceptional cases, not for controlling program flow. Use conditionals for expected scenarios.<pre>ruby\n# Bad\nbegin\nvalue = hash[:key]\nrescue\nvalue = nil\nend\n\n# Good\nvalue = hash[:key] || nil<\/pre><\/li><li><strong>Clean Up Resources with <\/strong><code>ensure<\/code>: Use <code>ensure<\/code> to close files, database connections, or other resources, even if an exception occurs.<\/li><\/ol><h3><strong>Real-World Examples<\/strong><\/h3><h4><strong>File Handling<\/strong><\/h4><p>Reading a file can raise exceptions like <code>Errno::ENOENT<\/code> (file not found) or <code>Errno::EACCES<\/code> (permission denied). Here\u2019s how to handle them:<\/p><pre>ruby\nbegin\n  File.open(\"nonexistent.txt\", \"r\") do |file|\n \u00a0\u00a0 puts file.read\n  end\nrescue Errno::ENOENT\n  puts \"File not found!\"\nrescue Errno::EACCES\n  puts \"Permission denied!\"\nensure\n  puts \"File operation complete.\"\nend\n# Output: File not found!\n# File operation complete.<\/pre><h4><strong>API Calls<\/strong><\/h4><p>When making HTTP requests, you might encounter network errors or invalid responses. Using the <code>httparty<\/code> gem:<\/p><pre>ruby\nrequire 'httparty'\n\nbegin\n  response = HTTParty.get('https:\/\/api.example.com\/data')\nrescue HTTParty::Error =&gt; e\n  puts \"API request failed: #{e.message}\"\nrescue SocketError\n  puts \"Network error: Could not connect to server\"\nelse\n  puts \"Received response: #{response.body}\"\nend<\/pre><h4><strong>Custom Exception Handling in a Class<\/strong><\/h4><p>Here\u2019s an example of a class that processes payments and uses custom exceptions:<\/p><pre>ruby\nclass PaymentError &lt; StandardError; end\nclass InsufficientFundsError &lt; PaymentError; end\nclass InvalidCardError &lt; PaymentError; end\n\nclass PaymentProcessor\n  def process_payment(amount, card)\n \u00a0\u00a0 raise InvalidCardError, \"Card is invalid\" unless valid_card?(card)\n \u00a0\u00a0 raise InsufficientFundsError, \"Not enough funds\" if amount &gt; card.balance\n \u00a0\u00a0 card.balance -= amount\n \u00a0\u00a0 puts \"Payment of #{amount} processed successfully\"\n  end\n\n  private\n  def valid_card?(card)\n \u00a0\u00a0 card.number.length == 16\n  end\nend\n\nclass Card\n  attr_accessor :number, :balance\n  def initialize(number, balance)\n \u00a0\u00a0 @number = number\n \u00a0\u00a0 @balance = balance\n  end\nend\n\ncard = Card.new(\"1234567890123456\", 50)\nprocessor = PaymentProcessor.new\n\nbegin\n  processor.process_payment(100, card)\nrescue InsufficientFundsError =&gt; e\n  puts \"Error: #{e.message}\"\nrescue InvalidCardError =&gt; e\n  puts \"Error: #{e.message}\"\nend\n# Output: Error: Not enough funds<\/pre><h3><strong>Advanced Exception Handling<\/strong><\/h3><h4><strong>Nested Rescues<\/strong><\/h4><p>You can nest <code>begin\/rescue<\/code> blocks to handle exceptions at different levels:<\/p><pre>ruby\nbegin\n  begin\n \u00a0\u00a0 raise \"Inner error\"\n  rescue\n \u00a0\u00a0 puts \"Caught inner error\"\n \u00a0\u00a0 raise \"Outer error\"\n  end\nrescue\n  puts \"Caught outer error\"\nend\n# Output:\n# Caught inner error\n# Caught outer error<\/pre><h4><strong>Exception Hierarchy<\/strong><\/h4><p>Understanding Ruby\u2019s exception hierarchy is crucial. Key classes include:<\/p><ul><li><code>ExceptionM<\/code>: Root class for all exceptions.<\/li><li><code>StandardError<\/code>: Default for <code>rescue<\/code> without a class; most built-in exceptions inherit from it.<\/li><li><code>RuntimeError<\/code>: Default for <code>raise<\/code> without a class.<\/li><li><code>NoMethodError, ArgumentError, TypeError<\/code>, etc.: Specific error types.<\/li><\/ul><p>To catch all exceptions (including non-<code>StandardError<\/code> ones like <code>SystemExit<\/code>), use <code>rescue Exception<\/code>:<\/p><pre>ruby\nbegin\n  exit\nrescue Exception\n  puts \"Caught exit\"\nend\n# Output: Caught exit<\/pre><h4><strong>Utilizando <\/strong><code>rescue_from<\/code><strong> in Rails<\/strong><\/h4><p>In Ruby on Rails, you can use <code>rescue_from<\/code> in controllers to handle exceptions globally:<\/p><pre>ruby\nclass ApplicationController &lt; ActionController::Base\n  rescue_from ActiveRecord::RecordNotFound, with: :not_found\n\n  private\n\n  def not_found\n \u00a0\u00a0 render file: 'public\/404.html', status: :not_found\n  end\nend<\/pre><p>This approach centralizes exception handling for specific controllers.<\/p><h3><strong>Common Pitfalls to Avoid<\/strong><\/h3><ol><li><strong>Catching All Exceptions Blindly<\/strong>: Using <code>rescue<\/code> without specifying an exception class can hide bugs.<\/li><li><strong>Overusing <\/strong><code>retry<\/code>: Retrying indefinitely can lead to infinite loops or mask underlying issues.<\/li><li><strong>Ignoring Exception Details<\/strong>: Always inspect the exception object (<code>e.message, e.backtrace<\/code>) for debugging.<\/li><li><strong>Raising Non-Standard Errors<\/strong>: Avoid raising exceptions that don\u2019t inherit from <code>StandardError<\/code>, as they won\u2019t be caught by default <code>rescue<\/code> clauses.<\/li><li><strong>Not Cleaning Up Resources<\/strong>: Forgetting to use <code>ensure<\/code> can leave files or connections open.<\/li><\/ol><h2><strong>Conclusi\u00f3n<\/strong><\/h2><p>Raising and rescuing exceptions in Ruby is a powerful way to handle errors and build robust applications. At <strong>RielesCarma<\/strong>, a leading <a href=\"https:\/\/www.railscarma.com\/es\">Empresa de desarrollo de Ruby on Rails<\/a>, we leverage these techniques to create reliable, maintainable solutions. By using <code>raise<\/code> to signal errors, <code>rescue<\/code> to catch them, and tools like <code>retry, else<\/code>, y <code>ensure<\/code>, developers can manage errors effectively. Custom exception classes and specific rescue clauses add clarity and precision to your code. Following best practices\u2014such as rescuing specific exceptions, keeping rescue blocks small, and using meaningful error messages\u2014ensures maintainable and reliable code.<\/p><p>Whether you\u2019re handling file operations, API calls, or domain-specific logic, Ruby\u2019s exception-handling system provides the flexibility to address errors gracefully. By mastering these techniques and avoiding common pitfalls, RailsCarma helps businesses build resilient Ruby applications that handle errors with confidence.<\/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<\/div>\n\t\t  <div class=\"related-post slider\">\r\n        <div class=\"headline\">Art\u00edculos Relacionados<\/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=\"Ruby on Rails para MLOps: Gu\u00eda completa para el despliegue de ML\" href=\"https:\/\/www.railscarma.com\/es\/blog\/ruby-on-rails-for-mlops-a-complete-guide-to-ml-deployment\/?related_post_from=41350\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Ruby-on-Rails-for-MLOps.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Ruby on Rails para MLOps\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Ruby-on-Rails-for-MLOps.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Ruby-on-Rails-for-MLOps-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Ruby-on-Rails-for-MLOps-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Ruby-on-Rails-for-MLOps-18x7.png 18w\" 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 on Rails para MLOps: Gu\u00eda completa para el despliegue de ML\" href=\"https:\/\/www.railscarma.com\/es\/blog\/ruby-on-rails-for-mlops-a-complete-guide-to-ml-deployment\/?related_post_from=41350\">\r\n        Ruby on Rails para MLOps: Gu\u00eda completa para el despliegue de ML  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Creaci\u00f3n de aplicaciones de inteligencia artificial con Ruby on Rails\" href=\"https:\/\/www.railscarma.com\/es\/blog\/building-agentic-ai-applications-with-ruby-on-rails\/?related_post_from=41339\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Building-Agentic-AI-Applications-with-Ruby-on-Rails.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Aplicaciones de IA Agentic con Ruby on Rails\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Building-Agentic-AI-Applications-with-Ruby-on-Rails.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Building-Agentic-AI-Applications-with-Ruby-on-Rails-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Building-Agentic-AI-Applications-with-Ruby-on-Rails-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/05\/Building-Agentic-AI-Applications-with-Ruby-on-Rails-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Creaci\u00f3n de aplicaciones de inteligencia artificial con Ruby on Rails\" href=\"https:\/\/www.railscarma.com\/es\/blog\/building-agentic-ai-applications-with-ruby-on-rails\/?related_post_from=41339\">\r\n        Creaci\u00f3n de aplicaciones de inteligencia artificial con Ruby on Rails  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Qu\u00e9 es Offliberty Ruby Gem y c\u00f3mo funciona\" href=\"https:\/\/www.railscarma.com\/es\/blog\/what-is-offliberty-ruby-gem-and-how-it-works\/?related_post_from=41304\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Offliberty Ruby Gem\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/What-is-Offliberty-Ruby-Gem-and-How-It-Works-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Qu\u00e9 es Offliberty Ruby Gem y c\u00f3mo funciona\" href=\"https:\/\/www.railscarma.com\/es\/blog\/what-is-offliberty-ruby-gem-and-how-it-works\/?related_post_from=41304\">\r\n        Qu\u00e9 es Offliberty Ruby Gem y c\u00f3mo funciona  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"C\u00f3mo crear una plataforma SaaS escalable con Ruby on Rails\" href=\"https:\/\/www.railscarma.com\/es\/blog\/how-to-build-a-scalable-saas-platform-using-ruby-on-rails\/?related_post_from=41273\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Crear una plataforma SaaS con Ruby on Rails\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/04\/Build-a-SaaS-Platform-Using-Ruby-on-Rails-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"C\u00f3mo crear una plataforma SaaS escalable con Ruby on Rails\" href=\"https:\/\/www.railscarma.com\/es\/blog\/how-to-build-a-scalable-saas-platform-using-ruby-on-rails\/?related_post_from=41273\">\r\n        C\u00f3mo crear una plataforma SaaS escalable con Ruby on Rails  <\/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>Las excepciones son una parte fundamental de la programaci\u00f3n en Ruby, ya que permiten a los desarrolladores manejar los errores con elegancia y garantizar aplicaciones robustas y tolerantes a fallos. El mecanismo de manejo de excepciones de Ruby es intuitivo pero potente, permitiendo a los desarrolladores lanzar errores cuando algo va mal y rescatarlos para prevenir ca\u00eddas de la aplicaci\u00f3n. En esta gu\u00eda de 2000 palabras, exploraremos c\u00f3mo lanzar y rescatar excepciones ...<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.railscarma.com\/es\/blog\/how-to-build-a-scalable-saas-platform-using-ruby-on-rails\/\"> <span class=\"screen-reader-text\">C\u00f3mo crear una plataforma SaaS escalable con Ruby on Rails<\/span> Leer m\u00e1s \u00bb<\/a><\/p>","protected":false},"author":11,"featured_media":40195,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1224],"tags":[],"class_list":["post-40177","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Raise and Rescue Exceptions in Ruby - RailsCarma<\/title>\n<meta name=\"description\" content=\"How to raise and Rescue Exceptions in Ruby: A guide to handling errors effectively and building robust Ruby applications.\" \/>\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\/es\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Raise and Rescue Exceptions in Ruby - RailsCarma\" \/>\n<meta property=\"og:description\" content=\"How to raise and Rescue Exceptions in Ruby: A guide to handling errors effectively and building robust Ruby applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.railscarma.com\/es\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\" \/>\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=\"2025-10-13T07:34:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-13T07:34:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.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=\"ashish\" \/>\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=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"ashish\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\"},\"author\":{\"name\":\"ashish\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/9699b14852b308edfeb03096b33c7a7a\"},\"headline\":\"How to Raise and Rescue Exceptions in Ruby\",\"datePublished\":\"2025-10-13T07:34:49+00:00\",\"dateModified\":\"2025-10-13T07:34:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\"},\"wordCount\":990,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png\",\"articleSection\":[\"Blogs\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\",\"url\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\",\"name\":\"How to Raise and Rescue Exceptions in Ruby - RailsCarma\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png\",\"datePublished\":\"2025-10-13T07:34:49+00:00\",\"dateModified\":\"2025-10-13T07:34:52+00:00\",\"description\":\"How to raise and Rescue Exceptions in Ruby: A guide to handling errors effectively and building robust Ruby applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png\",\"width\":800,\"height\":300,\"caption\":\"Raise and Rescue Exceptions in Ruby\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.railscarma.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Raise and Rescue Exceptions in Ruby\"}]},{\"@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\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.railscarma.com\/#organization\",\"name\":\"RailsCarma\",\"url\":\"https:\/\/www.railscarma.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@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\/9699b14852b308edfeb03096b33c7a7a\",\"name\":\"ashish\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/204411c7d72714bc32d5ac6398e0596896318386bd537860fdd14ce905a79e07?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/204411c7d72714bc32d5ac6398e0596896318386bd537860fdd14ce905a79e07?s=96&d=mm&r=g\",\"caption\":\"ashish\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Raise and Rescue Exceptions in Ruby - RailsCarma","description":"How to raise and Rescue Exceptions in Ruby: A guide to handling errors effectively and building robust Ruby applications.","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\/es\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/","og_locale":"es_ES","og_type":"article","og_title":"How to Raise and Rescue Exceptions in Ruby - RailsCarma","og_description":"How to raise and Rescue Exceptions in Ruby: A guide to handling errors effectively and building robust Ruby applications.","og_url":"https:\/\/www.railscarma.com\/es\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/","og_site_name":"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","article_publisher":"https:\/\/www.facebook.com\/RailsCarma\/","article_published_time":"2025-10-13T07:34:49+00:00","article_modified_time":"2025-10-13T07:34:52+00:00","og_image":[{"width":800,"height":300,"url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png","type":"image\/png"}],"author":"ashish","twitter_card":"summary_large_image","twitter_creator":"@railscarma","twitter_site":"@railscarma","twitter_misc":{"Escrito por":"ashish","Tiempo de lectura":"5 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#article","isPartOf":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/"},"author":{"name":"ashish","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/9699b14852b308edfeb03096b33c7a7a"},"headline":"How to Raise and Rescue Exceptions in Ruby","datePublished":"2025-10-13T07:34:49+00:00","dateModified":"2025-10-13T07:34:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/"},"wordCount":990,"commentCount":0,"publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"image":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png","articleSection":["Blogs"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/","url":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/","name":"How to Raise and Rescue Exceptions in Ruby - RailsCarma","isPartOf":{"@id":"https:\/\/www.railscarma.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage"},"image":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png","datePublished":"2025-10-13T07:34:49+00:00","dateModified":"2025-10-13T07:34:52+00:00","description":"How to raise and Rescue Exceptions in Ruby: A guide to handling errors effectively and building robust Ruby applications.","breadcrumb":{"@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#primaryimage","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2025\/10\/How-to-Raise-and-Rescue-Exceptions-in-Ruby.png","width":800,"height":300,"caption":"Raise and Rescue Exceptions in Ruby"},{"@type":"BreadcrumbList","@id":"https:\/\/www.railscarma.com\/blog\/how-to-raise-and-rescue-exceptions-in-ruby\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.railscarma.com\/"},{"@type":"ListItem","position":2,"name":"How to Raise and Rescue Exceptions in Ruby"}]},{"@type":"WebSite","@id":"https:\/\/www.railscarma.com\/#website","url":"https:\/\/www.railscarma.com\/","name":"RailsCarma - Empresa de desarrollo Ruby on Rails especializada en desarrollo offshore","description":"RailsCarma es una empresa de desarrollo de Ruby on Rails en Bangalore. Nos especializamos en el desarrollo offshore de Ruby on Rails con sede en EE. UU. e India. Contrate desarrolladores experimentados de Ruby on Rails para disfrutar de la mejor experiencia web.","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":"es"},{"@type":"Organization","@id":"https:\/\/www.railscarma.com\/#organization","name":"RielesCarma","url":"https:\/\/www.railscarma.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@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\/9699b14852b308edfeb03096b33c7a7a","name":"ashish","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/204411c7d72714bc32d5ac6398e0596896318386bd537860fdd14ce905a79e07?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/204411c7d72714bc32d5ac6398e0596896318386bd537860fdd14ce905a79e07?s=96&d=mm&r=g","caption":"ashish"}}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/posts\/40177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/comments?post=40177"}],"version-history":[{"count":0,"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/posts\/40177\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/media\/40195"}],"wp:attachment":[{"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/media?parent=40177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/categories?post=40177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.railscarma.com\/es\/wp-json\/wp\/v2\/tags?post=40177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}