While working on a Rails application, we all have had to change the database column in some way. You can change the column name and the column type, as well as changing the column with the type conversion.
Struggling with installing Bootstrap 5 on Rails 6 application? This article will help you.
In this article, I will try to go through some important points of how to set up and build a Rails API with react as front-end.
As Ruby on Rails developers, we do not have to worry too much about the operations in the database due to the Object-Relational-Mapping or ORM. The ORM allows us to focus more on the logic of the business while it handles the operations with the database on our behalf.
Heroku is one of the top PaaS in the market thanks to many of its features that make focus on development instead of configuration and maintenance. This has bee
Security is and will always be a very big deal, this is largely true in all spheres of life but more-so in software development. One costly mistake can leave you vulnerable to stolen API Keys and Secrets, we wouldn't want that now, would we?
When I was recently working in one of the client projects, I had to communicate with external MariaDB server to store records from React/Rails app, that means I would get ActiveRecord hash from our app which I had to convert to pure SQL query and send it to an external server for storing.
Debugging in a docker container isn't that straightforward. At least it is not in the way my team set everything up. I will describe my methods for debugging.
In this blog post, we will discuss how to integrate Google Identity Services into any of your front-end applications.
This is going to be a very straightforward article, no jokes included.
Recently I was working on a project in RoR and I realized I wanted to show the navigation bar and footer on some pages and nothing on others. For example, Imagine a signup page with a navbar !!! Yuck, not only does it not look pretty but also, I have never seen any design where the login/logout pages have a navigation bar. Very few designs like that do exist, and in my opinion, are not the best.
Rails (or ruby on rails) used to the most popular web development framework just a couple of years ago, but it's not so popular now. If you are struggling to make a decision, this post may end up saving a lot of your time. But it is recommended that do research of your own about the technology and what it does best, will it be a good fit for you?
How to create a Ruby on Rails application with Postgresql and React with Docker Compose
Having fancy link previews encourages people to click on the fancy links and visit your site. Here is how you can imitate it easily for your own site.
Why do so many startups choose Ruby on Rails over other technologies?
Ok, first of all, this isn’t an article about which framework is better since they have different base languages.
Building single page application with Ruby on Rails? Check out Hotwire. It utilizes server side rendering to send HTML over the wire. by Aleksandr Ulanov
You can keep your Rails app cleaner and easier to maintain using Service Objects. Service objects help to decouple business logic from your controllers
The terminal comands below will allow you to delete and re-create your Active Record database.
Rails is a great framework that enables us to avoid grungy but essential topics like database connection pooling with all the inherent complexities of multi-threading and error handling.
Infold is a scaffold code generator for CRUD applications, such as an Admin panel with Rails7. This article explains how to use Gem in a tutorial format.
What is closure
Almost any app that we build has a lot of interactive options with a lot of data, to this we can also have conditions to which data should we show to what type of user, making us request data from different tables based on a unique identifier, if the queries are not handled in a proper manner this can slow down the loading, and that is because of the "N + 1" problem.
There are times when you want to know how your capybara tests are interacting with your pages, sometimes it’s not enough the log on your console to determine why they are not working as expected, that’s why you can make it display the steps on your browser in real-time. The steps to do this are really easy thanks to the Selenium Project, which is in charge of providing us the necessary infrastructure to interact with the interface of all major web browsers.
Ruby on Rails is an established, battle-tested technology that served as an excellent framework for software developers. But what’s the secret behind the success of Rails? One good reason is that ever since it appeared on the tech scene, it’s been part of projects launched by companies that have become some of the fastest-growing and largest startups we’ve ever seen.
Due to the inability to generate a well-defined way to authenticate rails API, I have sourced out this information in order to help me and you have a way of authenticating our rails API token. This tutorial would be based on the latest version (6.0) of Ruby on Rails.
With the launch of Rails 6, one of the new features that were announced was of multiple database support.
Introduction and Definition
Ruby on Rails is a tremendous framework when you want development speed for your project or startup. It’s useful right out of the box and comes with a plethora of behind-the-scenes magic to make your life easier. However, it’s not considered the fastest framework out there in terms of performance. You will find examples of individuals and companies drifting away from Rails in favour of something else. Despite this, there are many companies out there who have succeeded in scaling Rails and found success — just take a look at Airbnb, Github, Gitlab & Shopify.
This manual explains how to install the most recent stable version of Ruby on Linux, without using rbenv or alternative version managers. The goal was to find a fast and reliable approach for provisioning expendable virtual machines for Rails development environment.
An association is a connection between two Active Record models. It makes much easier to perform various operations on the records in your code. We will divide associations into four categories:
So, you're asked to test your application but have no idea how to begin. Or you read about TDD, RSpec, FactoryBot, Capybara, and maybe you didn't understand what they were meant for, or maybe when you tried to run them into your project nothing worked.
Hello everyone, how has it been working with the challenges of COVID-19? Today, I will be sharing how I got gritter to work with Rails 6. According to the github Readme;
One of the first things that made me uncomfortable about learning Rails was taking a look at the views. I found some weird files with some weird syntax. Their name was something like ‘name.html.erb’ and I was like what? Why does this file which seems to be an HTML file with kind of HTML syntax has a .erb extension after the .html extension?
Designing a multi-tenant application on Rails with horizontal sharding
I have always been fascinated with one’s ability to create or recreate. Software development for gives me a way to translate my imaginations into useful tangible things. The feeling I get after going through challenges to figure out how to put my ideas together, is incomparable. Full-stack development is the combination of both front-end technologies and back-end technologies to create a fully functional application. In this tutorial, we are going to combine front-end technology called React and Redux with a back-end technology called Rails to create a simple sign-up system.
In a many to many relationship, it's just a table between the entities, but what is the purpose of this table to be between them?
After a few years of continuous development, your rails application becomes larger and it’s good practice to do some cleanup. One of the most obvious cleanups is cleaning up unused routes.
If seeding the database for your end-to-end tests is taking too long—or not finishing at all—here are three ways to speed things up.
Is ruby on rails still used? absolutely. There is a list of reasons from many startups and a direct review from developers. Take a look at this article hurry!
An application can only be as good as the features it is providing for its end-users. Every developer toes the line between indiscriminately adding gems and building new functionality themselves. When time is of the essence, these are the gems I reach for:
When I was recently working in one of the client project, I had to communicate with external mariadb server to store records from react/rails app, that means I would get activerecord hash from our app which I had to convert to pure sql query and send it to external server for storing.
If you have worked with sql queries previously then you must know that keys and values must be separated for insert operations like
This tutorial shows how to perform basic select queries to interact with MySQL Server using mysql2 gem.
As a student of Microverse, I’ve reached the point where Rails’ framework was introduced to me. It appeared to me with the best omens on its hands. Ruby on Rails is a starting point for many start-ups because all of them got blinded by its beauty and simplicity. I have to admit that I felt intimidated for a while. Surely I can't say we are the best friends now but things started to make sense. Ruby on Rails is designed under the MVC principles - Model View Controllers.
In this post, we are going to talk a lot about asynchronous functions, something very fashionable nowadays, but not so much just a few years ago.
When we start developing an app we usually do it the old fashion way: we get an idea, we elaborate on it, we make a plan to develop an app then we start coding and in the end, we test if our app is working properly.
YAML: literally meaning “Yaml ain’t markup language” can mess you up in the beginning. Rails generates this file for you and you have to change it for Heroku. YAML spacing has to be exact and it’s important to know a tab is not the same as four spaces.
It´s better to wait for a productive programmer to become available than it is to wait for the first available programmer to become productive. — Steve McConnell
“…3,813 breaches were reported through June 30, 2019, exposing over 4.1 billion records. Compared to the midyear of 2018, the number of reported breaches was up 54% and the number of exposed records was up 52%”. - Source, RiskBasedSecurity
Why You Should Care About Encryption
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live” — John F. Woods
Sending mail from a Rails application has been covered by hundreds or thousands of articles, however, there is not a ton of articles about receiving, parsing and using the new ActionMailbox.
Our Rails’ version was 4.2 and we needed to upgrade to a later version mostly because Heroku stack requires it.
Ruby on Rails framework (RoR) is the dream of every developer. It does pretty much everything for you without much effort, and once you learn it and deeply understand it, you can build an entire website in a couple of hours (Of course, styling it is a different story). The hard part of rails is to understand the magic behind it.
Introduction
Becoming the owner of a legacy Rails app can mean inheriting a project bogged down with tech debt, bugs, and sketchy documentation. Here's how to survive it.
This is a tutorial about how we can implement IBM Cloud Storage in our Ruby on Rails 6 projects. We can upload images and manage these assets with Rails. In this tutorial we are going to build a simple app. We can upload a kitty photo and vote for that photo (this tutorial only includes the part of creating a new Rails app, configuring it to save our photo on the cloud, and showing it on an image tag; the design and the part for the photo will be included in the app but is not shown in this tutorial).
A quick story explaining the Ruby on Rails MVC architecture. You find yourself at the Ruby on Rails train station exploring the MVC architecture.
Visit the /Learn Repo to find the most read stories about any technology.