Searching in Rails app with Ransack howto by Komal Swami - March 6, 2023March 6, 20230 Beginners guide In previous articles we have covered beginner guides for debugging ruby on rails application, in this post we shall cover searching and sorting in the rails app with ransack library. After reading this article you would realise that adding Ransack gem to your MVC- model and view controller application and you’re all set to use searching and sorting. You would barely need custom routes or helpers functions. Everything is available in ransack gem :-). At the end of this article I have tried to provide alternatives to ransack and some security flaws in ransack gem if it is used in default configurations. Introduction Ransack will help you easily add searching and sorting capabilities to your Rails application, without any
Beginners Guide To Managing User Permissions In Rails Apps development by Komal Swami - May 27, 20220 This post shares details about Beginners Guide To Managing User Permissions In Rails Apps and User Roles Management With Devise Gem in ruby on rails. There are lot of available resources on internet about device gem, as this is widely used gem when it come to user management and authentication solution for Rails. This has been used in solidus, sinatra etc. This post mainly focuses on beginer level to advanced level on how to setup devise gem and get going with step by step examples for Rails roles and permissions gem. Lets dwel into Devise gem. Introduction Ruby on Rails follows the DRY Don't Repeat Yourself principle of software development. which means we don't write the same piece of code over and
Beginners’ Guide To Pry Gem For Debugging RoR Applications development by Komal Swami - April 15, 2022April 15, 20220 In the previous post, we enjoyed playing around with Byebug, The de-facto debugger for Ruby on Rails Rails. This post for Beginners' Guide To Pry Gem For Debugging RoR Applications, will dwell on another debugging technique of debugging ruby on rails applications. Before getting into pry, As we know REPL, REPL stands for Read-Eval-Print-Loop. It’s a program that allows you to type Ruby code & see the result directly. IRB is the built-in Ruby REPL that every Ruby developer is familiar with. Debug Using IRB - Interactive ruby shell How can you use IRB?Interactive Ruby Shell. You can open IRB by typing IRB inside a terminal window. Then you can write your Ruby code & press enter to run it. If you
Debugging Ruby on Rails With byebug development by Komal Swami - March 28, 2022March 28, 20221 The de-facto debugger for Rails is Byebug. It works with Rails were things like Pry fall short, comes recommended by the core Rails team, and is even bundled with Rails. This article will walk you through getting set up with basic Debugging Ruby on Rails With byebug. The debugger permits the ability to understand what is going on inside a Ruby program while it executes and offers many of the traditional debugging features such as: Stepping: Running your program one line at a time.Breaking: Pausing the program at some event or specified instruction, to examine the current state.Evaluating: Basic REPL functionality, although pry does a better job at that.Tracking: Keeping track of the different values of your variables or the different lines executed by your program. Requirements Required:
Deploy Rails App on AWS Server howto by redminelab_h5if6c - October 21, 2021October 21, 20210 This post is very quick guide about how to deploy ruby on rails application on AWS cloud running apache2 webserver. Deploying application means putting it on a Web server so that it can be used either through the Internet or an intranet. This Web server might be local UNIX system, while you develop and debug your application to check its working or a AWS cloud server. System Pre-requisites Server (VM or physical) accessible and ssh setup for deployment You need app which ready to go server ( Normal app ,Docker, Container )Web app server just like (apache, nginx) also you need your passenger mod for assistRuby, rail, gems installed Last your required database which you want to use (MySQL,
How To Deploy Ruby App On AWS With Capistrano howto by redminelab_h5if6c - October 10, 2021November 11, 20211 This post will show you steps on how to deploy the ruby rails app on the AWS server running apache and phusionpassenger using Capistrano. As you know Capistrano is a widely used deployment automation tool for ruby applications. It uses 'ssh' to deploy from the development server or staging server to the production server. There is other CI/CD software deployment automation tool like 'mina' but Capistrano is famous for ruby on rails application because of its support for asset pipeline and database migration. Prerequisites On the server side - I am using Ubuntu 18.04.4 LTS AWS instance along with "ubuntu" user - sudo privileges on the server side. I will be using 'ubuntu' as a deployment user, you can create
Hello World With Sinatra Web Framework howto by Komal Swami - August 23, 2021August 23, 20211 Sinatra is a lightweight web framework. Sinatra is similar to Ruby on Rails web frameworks. It's pretty different from Rails as it's much lighter (less overhead), and you have more fine-grained control over your web app. Additionally, there is no built-in database functionality or page rendering — all of that is done manually. So it is more popular among millennials as you can bend it like the way you need. Sinatra Introduction Unlike Ruby on Rails, which is a Full Stack Web Development Framework that provides everything needed from front to back, Sinatra is fast, simple and efficient. However, with that comes more work and more room for error. Sinatra is best used for smaller web applications or ones that don't