Please read contributing guidelines before submitting new resources.
Websites that offer free fonts as well as font based tools
| CMD | Description |
|---|---|
rails new myapp --database=postgresql |
rails db as postgress |
rails new myapp -d mysql |
rails db as mysql |
rails new myapp -T |
skip test framework |
rails new sti --no-test-framework |
skip test framework |
rails new myapp --skip_webpack_install |
wob application without webpack installation |
rails new my_api --api |
Rails application that will be an API server first and foremost,n |
rails server -b 0.0.0.0 |
it will bind to all IP addresses on your machine (LAN access) |
rails s -e production |
Rails app in Production mode |
rails c |
Rails console mode |
DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=production rails c |
Rails console mode in production |
rails db:create |
create database |
rails db:drop |
delete database |
rails db:setup |
this will run scheema then seed |
rails db:migrate |
this will run migrations generate scheema |
rails db:rollback STEP=1 |
rollback last migration |
rake db:migrate:down VERSION=20100905201547 |
rollback specific migration |
rails g scaffold Post name:string title:string content:text |
Creating a Resource using scaffold |
rails g model sale/order |
Creating modulizhe model |
rails g controller users index show delete |
Creating a controller with index show show function |
rails g model YourModel --migration=false |
Creating model without migration |
rails g model Admin --parent=User |
Creating subclasses |
Ruby on Rails usefull gem in development.
| gem | Description |
|---|---|
| gem 'bullet' | To identify N+1 query |
| gem 'rack-cors' | |
| gem 'rack-attack' | |
| gem 'brakeman' | |
| gem 'reek' |
| | gem 'better_errors' | discription | | gem 'rubocop-rails' | discriptionsss | | gem 'factory_bot_rails' | discription| | gem 'strong_migrations' | | | gem 'exception_notification' | | | gem 'slack-notifier' | | | gem 'rubycritic' | provide a quality report of your Ruby code. |
