DEV Community

Cover image for Ruby on Rails Reference - CLI Commands, Bundler, Macros
Alex Merced
Alex Merced

Posted on

Ruby on Rails Reference - CLI Commands, Bundler, Macros

Gems

Gems are Ruby Libraries, and the gem command is like npm in the nodeJS world. Here are some of the main Gem commands.

Gems

Bundler

Keeping tracks of which Gems are used in a project can be tricky. Similar to package.json in Node you have a Gemfile that lists a projects dependencies. With bundler you can make sure all these Gems are installed.

Bundler

Ruby on Rails CLI

The Ruby on Rails CLI has several commands to make assempling your rails project very easy. Here are some of those commands.

Rails Commands Part I

Rails Commands Part II

Rails Commands Part III

Rails Commands Part III

Active Record Types

Active Record is the ORM that Ruby on Rails uses to work with SQL databases. When using generator commands you can specify fields and types to quickly generate models and migrations. Here are the many Active Record types.

Active Record Types

Model Macros

In your models there are several macros that help add features and functionality to your models.

Rails Model Macros

Route Macros

Macros for Routes

Route Macros

Oldest comments (0)