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 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
How to Backup PostgreSQL Data From Files DB by redminelab_h5if6c - July 23, 2021July 23, 20210 This article is about how to make backup of a database from filesystem in PostgreSQL. Also provides details on how to make and restore the database from filesystem. If you have come across case where you are required to start 'psql' database from filesystem backup. There might be case that some of Ubuntu files crashed during a blackout. The Ubuntu needs to be reinstalled. You do not have database backup files, you have somehow restored filesystem, or situation like, you forgot the AWS root password and you need to redo all setup right from database on other instance. This post is about second case, where I forgot the AWS root password, so I have attached the filesystem to other instance
Install Redmine On AWS Server Using CLI howto by Someshwar Mirge - May 7, 2021May 7, 20210 We are trying to install redmine on AWS server using CLI - command line. This step by step guide will help you to setup. There is docker file available on AWS markatepalce . This redmine was installed on other AWS instance running Ubuntu. But with this user is getting error while downloading attachments. User is getting "Internal server error", and he is not able to download the attachments. So we have decided to install redmine using command line. This helped to solve the issue and now redmine is running on new AWS instance. We have installed our redmine in /var/data/redmine/redmine-4.2.1 .(redmine installation guide) We are using webrick web server for redmine and its default output is at
MySqldump Failed on AWS Server howto by Someshwar Mirge - May 6, 2021May 7, 20210 Taking Database Backup We are using AWS Ubuntu 20.04 LTS Server and Latest MySql . We are trying to migrate databse to new server using mysqldump . We have tried to take the backup of existing databse but it thrown a error messege. /usr/bin/mysqldump -u user -p'password' databse | gzip > /var/data/redmine/backup/redmine_date +%Y-%m-%d.gz mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces This happen because , in never version of mysql (>=8.0) It requires elevated previlages to backup db. So we elevated previlages. mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> SHOW GRANTS for redmine@localhost; +--------------------------------------------------------------+ | Grants for redmine@localhost | +--------------------------------------------------------------+ | GRANT USAGE ON .