FeaturedIT topics

How to create a component-based Rails application

The use of the components approach in Rails can improve maintainability, reduce complexity, and accelerate testing in large Rails applications.

In preparation for creating your first component-based Rails application (CBRA) app, you should ensure that your system is up to date with regard to Ruby and Rails. I suggest using the latest published versions of both Ruby and the Rails gems. The way I have my system set up, using the Ruby Version Manager (RVM), is something like the following:

Install rvm, bundler, and rails. 
Execute anywhere $ rvm get stable $ rvm install 2.4.2 $ gem install bundler -v '1.15.4' $ gem install rails -v '5.1.4'

The entire app inside a component

In this section, we will be creating a Rails application that contains no handwritten code directly in the app folder and instead has all code inside an engine mounted into the application.

Related Articles

Back to top button