Rails GraphQL Beginner Tutorial - Part 1

Goal This article is the first post of rails GraphQL beginner serial, I'm going to create a demo to show how to use GraphQL in Rails by querying book records in DB. First of all, let's list all the thing we need to know about the following steps. The graphql gem. A table named books. ID NAME

The Behaviors of Dependent Destroy on Rails ActiveModel

what is dependent :destroy Dependent is an option of Rails collection association declaration to cascade the delete action. The :destroy is to cause the associated object to also be destroyed when its owner is destroyed. Code Preparation First, the DB shemas and Rails Model should be ready for the

ERROR: Error Installing Nokogiri: Invalid Gem: Package is Corrupt on Mac

Issue This error came out when I'm trying to bundle install Rails with rbenv on my MacBook, after retry several times, finally got this solution to install Nokogiri successfully. -> bundle Bundler::GemspecError: Could not read gem at /Users/username/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/cach

Error: An error occurred while installing nokogiri, and Bundler cannot continue on Ubuntu

Issue I got this error on when try to install nokogiri on a Ubuntu 18.10 server. It seems like I've not install the required packages correct on the system. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /root/alert/vendor/bundle/ruby/2.5.0/gems/nokogir