Ok, first of all, this isn’t an article about which framework is better since they have different base languages. If you are a beginner this post will help to understand frameworks and how they work. If you already use one of them you will see that they are pretty similar. I have worked with Laravel before but recently I got into Rails and found out that they are actually very similar frameworks. so let’s start with a little background. A Framework is a bunch of structures, rules, and concepts that help the programmers to work in a team without going crazy. These two frameworks will help you to create websites in an easier and faster way than do it with vanilla code. Rails is a Ruby framework created by David Heinemeier and released in 2005. Laravel is a PHP framework created by Taylor Otwell and released in 2011. both use the MVC pattern, both have continuous support and a huge community. But let’s start with the MVC so we can see how they work. the first thing is the ‘M’ the Model, this is how the frameworks communicate with the database through an ORM. Rails use ActiveRecord and Laravel uses Eloquent. you can create a model with this command in Rails. rails model Car generate The same comand in Laravel php artisan make:model Car -m This command is going to generate 2 files, The model and the migration, but I’m not going to talk about that because this is not a Laravel or Rails tutorial. the structure of the folders it’s pretty much the same, so you can find your model and migrations easily. A basic migration code its the following. { Schema::create( , { $table->bigIncrements( ); $table->string( ); $table->integer( ); $table->timestamps(); }); } { Schema::dropIfExists( ); } // Laravel /database/migrations/date_code_create_cars_table.php public function up () 'cars' function (Blueprint $table) 'id' 'name' // not generated 'year' // not generated public function down () 'cars' create_table t.string t.integer t.timestamps # Rails /db/migrate/date_code_create_cars.rb def change :comments do |t| :name # not generated :year # not generated end end The migrations are the same but you can see how Rails do the work for you by doing ‘up’ and ‘down’ in one method ‘change’. we added 2 lines in each migration and they have similar syntax. but we could easily do this in rails extending the previous command like this. rails g model Car name:string year:integer And this is just one example because rails could do so much more like the entire CRUD scaffold for a model. We are going to insert one car in the databases so we can work with it without doing all the CRUD. cars( , ) ( , ) INSERT INTO name year VALUES 'Tesla' 2019 So let’s continue with the ‘C’ that includes the Route and the Controller. first, we are going to set the routes that look like this. get ‘/car’, ‘car # Rails /config/routes.rb to: #index’ Route::get(‘/car’, ‘CarController@index’)->name(‘car.index’); // Laravel /routes/web.php As you can see its pretty much the same, rails automatically name the route so you can use it in the view and with Laravel, you have to name it. Although Rails syntax looks simpler could be magical or mystical, and sometimes we want to know exactly what we are doing. Then we have the controller, we could generate the controller with the basic commands. Laravel php artisan make:controller CarController Rails rails g controller car Rails is going to generate also a folder for the controller views in , with Laravel you have to manually create it. and this is how the controllers look like. ‘/app/views’ @car = Car.first # Rails /app/controllers/car_controller.rb def index end \ ; . . { $car = Car::first(); view( , compact( )); } // Laravel /app/Http/Controllers/CarController.php use App Car public function index () return "car.index" 'car' Again we see how rails magically returns the view while in Laravel we have to specify it. And also you have to import the class “Car” if you want to use it. Finally we have to create our views, we can just create the files. Laravel uses “Blade” as a Template Engine, and Rails uses “ERB” so the code looks like this. <%= %> <%= %> # Rails /app/views/car/index.html.erb Car name: < > b </ > b @car.name Car year: < > br < > b </ > b @car.year @extends( ) @section( ) <b>Car :</b> {{$ }} <br> <b>Car year:</b> {{$ year}} @endsection // Laravel /resources/views/car/index.blade.php 'layout.app' 'content' name -> car name -> car You can create the layout with Laravel and use it like in the previous example and Rails is going to create it for you. also, you don’t have to specify the layout in Rails(but you can). And finally, you have something like this Conclusion I have a lot of respect for Laravel, and I love it, but we can see how Rails makes all the basics really easy. Both are great frameworks and you need to have in mind that there a lot of factors to consider to use one of them, like deploy, hosting costs, performance, etc.. But why just learn one? once you learn one the second is a piece of cake. so don’t let the “code wars” blind you, and learn whatever you want in the end knowledge is always good. Rails❤Laravel.