-
Notifications
You must be signed in to change notification settings - Fork 0
/
rails_install_notes.txt
739 lines (483 loc) · 23.1 KB
/
rails_install_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
Ruby Installation:
===============================================================================
Pre-installed
--------------
> apt install curl git build-essential htop vim
> apt install imagemagick
> sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev libsqlite3-dev
- RVM
1.3 Ruby Versions
Rails generally stays close to the latest released Ruby version when it's released:
Rails 7 requires Ruby 2.7+
Rails 6 requires Ruby 2.5.0 or newer.
Rails 5 requires Ruby 2.2.2 or newer.
Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
Rails 3.2.x is the last branch to support Ruby 1.8.7.
Rails 3 and above require Ruby 1.8.7 or higher. Support for all of the previous Ruby versions has been dropped officially. You should upgrade as early as possible.
RVM
----
- https://rvm.io/
> gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
> \curl -sSL https://get.rvm.io | bash -s stable
> \curl -sSL https://get.rvm.io | bash -s stable --rails
> gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
> \curl -sSL https://get.rvm.io | bash -s stable --ruby
> \curl -sSL https://get.rvm.io | bash -s stable --rails
- upgrade
> rvm get stable
> rvm get stable --auto-dotfiles
Downloading https://get.rvm.io
Could not download rvm-installer, get some help at #rvm IRC channel at freenode servers. Mmmmmmmmmmmmm !!!!
> \curl -sSL https://get.rvm.io | bash -s stable
curl: (60) SSL certificate problem: certificate has expired
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
> sudo update-ca-certificates
didbn't work ?
# https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
> sudo dpkg-reconfigure ca-certificates
> \curl -sSL https://get.rvm.io | bash -s stable
> rvm reload
> rvm get stable
> rvm reinstall ruby-3.1.0
- ruby compilation & SSL
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at
rvm.io/packages/openssl.
> rvm autolibs rvm_pkg # not imporant
> sudo apt-get install libssl-dev libreadline-dev libgdbm-dev
> sudo apt-get install openssl --reinstall
- let's add openssl to rvm
> rvm pkg install openssl
Beware, 'rvm pkg ...' is deprecated, read about the new autolibs feature: 'rvm help autolibs'.
> rvm reinstall all --force
- didn;t work ?
- maybe I'm using old ubuntu 14.04
> sudo apt purge libssl-dev && sudo apt install libssl1.0.0
> rvm autolibs fail # to get further instructions
> rvm autolibs enable
> rvm reinstall 3.1.0 --with-openssl-dir=$HOME/.rvm/usr
> rvm reinstall --disable-binary 3.1.0 # rebuild ruby
Ubuntu --- security issues ?
----------------------------
> rvmsudo rvm get stable --auto-dotfiles
> rvm fix-permissions system
> rvm group add rvm $USER
To upgrade to 6 !
-----------------
> rails app:update
Now 6 ?
5 --> 6 .. using webpacker
> bin/rails webpacker:install
Install new ruby / rails
------------------------
> rvm install ruby-3.0.0
> rvm use ruby-3.0.0@[project] --create
> gem install rails
> rails new [project]
> cd [project]
> echo "rvm use ruby-3.0.0@[project]" > .rvmrc
> bundle
> rails server -p 3003 -b 0.0.0.0
Rails new
----------
> rails new app -d=sqlite3 -T --skip-coffee # --api --webpack=react
> rails server -p 3003 -b 0.0.0.0
# postgres
> rails new spree3 --database=postgresql
> cd spree3
> Gemfile:
gem 'pg'
> rails new -h
Usage:
rails new APP_PATH [options]
Options:
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines)
[--skip-collision-check], [--no-skip-collision-check] # Skip collision check
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/isalem/.rvm/rubies/ruby-3.0.0/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-G, [--skip-git], [--no-skip-git] # Skip .gitignore file
[--skip-keeps], [--no-skip-keeps] # Skip source control .keep files
-M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files
[--skip-action-mailbox], [--no-skip-action-mailbox] # Skip Action Mailbox gem
[--skip-action-text], [--no-skip-action-text] # Skip Action Text gem ->>>>>>> https://trix-editor.org/ https://github.com/basecamp/trix
-O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files
[--skip-active-job], [--no-skip-active-job] # Skip Active Job
[--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files
-C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files
-A, [--skip-asset-pipeline], [--no-skip-asset-pipeline] # Indicates when to generate skip asset pipeline
-a, [--asset-pipeline=ASSET_PIPELINE] # Choose your asset pipeline [options: sprockets (default), propshaft]
# Default: sprockets
-J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files
[--skip-hotwire], [--no-skip-hotwire] # Skip Hotwire integration
[--skip-jbuilder], [--no-skip-jbuilder] # Skip jbuilder gem
-T, [--skip-test], [--no-skip-test] # Skip test files
[--skip-system-test], [--no-skip-system-test] # Skip system test files
[--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem
[--dev], [--no-dev] # Set up the application with Gemfile pointing to your Rails checkout
[--edge], [--no-edge] # Set up the application with Gemfile pointing to Rails repository
--master, [--main], [--no-main] # Set up the application with Gemfile pointing to Rails repository main branch
[--rc=RC] # Path to file containing extra configuration options for rails command
[--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file
[--api], [--no-api] # Preconfigure smaller stack for API only apps
[--minimal], [--no-minimal] # Preconfigure a minimal rails app
-j, [--javascript=JAVASCRIPT] # Choose JavaScript approach [options: importmap (default), webpack, esbuild, rollup]
# Default: importmap
-c, [--css=CSS] # Choose CSS processor [options: tailwind, bootstrap, bulma, postcss, sass... check https://github.com/rails/cssbundling-rails]
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend], [--no-pretend] # Run but do not make any changes
-q, [--quiet], [--no-quiet] # Suppress status output
-s, [--skip], [--no-skip] # Skip files that already exist
Rails options:
-h, [--help], [--no-help] # Show this help message and quit
-v, [--version], [--no-version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory,
or in $XDG_CONFIG_HOME/rails/railsrc if XDG_CONFIG_HOME is set.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
Quick rails new
----------------
> rails new --help
-T skip test
-J skip javascript
-S skip sprockets
-C skip action cable
-P skip puma
-O skip models
-M skip action mailer
-d mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc
default sqlite3
- Quick rails 6 API / React
> rails new my_api_app --api -T
> rails g model / resource / scaffold
> rails new myapp --webpack # with webpack -> adds the gem webpacker --> adds node_modules
> bundle
> bundle exec rails webpacker:install
Or
> bundle exec rake webpacker:install
> yarn upgrade
- Now, build new app with react
> rails new rails_react_recipe -d=postgresql -T --webpack=react --skip-coffee
- install front end dependencies
> yarn add react-router-dom bootstrap jquery popper.js
"dependencies": {
"@babel/preset-react": "^7.0.0",
"@rails/webpacker": "^4.0.7",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"bootstrap": "^4.3.1", <-- added by yarn
"jquery": "^3.4.1", <-- added by yarn
"popper.js": "^1.15.0", <-- added by yarn
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router-dom": "^5.0.1" <-- added by yarn
- add the following to layout file:
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<%= javascript_pack_tag 'Index' %>
... https://www.digitalocean.com/community/tutorials/how-to-set-up-a-ruby-on-rails-project-with-a-react-frontend
- spring
> spring status / start / stop
> bundle exec spring binstub --all
> DISABLE_SPRING=true bundle exec rails server -p 3002
- new API app only
> rails new my_api_app --api -T
* https://www.bootrails.com/blog/rails-new-options/
> rails new myapp --minimal
# There's now a new way (since Rails 6.1) to create a minimalist Rails app. It build a new app in a few seconds, with only 7 gems (at the time of writing).
A minimal rails stack to get you started, everything that is excluded:
skip_action_cable
skip_action_mailbox
skip_action_mailer
skip_action_text
skip_active_job
skip_active_storage
skip_bootsnap
skip_jbuilder
skip_spring
skip_system_tests
skip_turbolinks
skip_webpack
Sprockets should have JavaScript folders by default
rails new --minimal webpack=react works
Awesomeness && Bootstrapers
---------------------------
- https://github.com/markets/awesome-ruby#file-system-listener
Running rails
-------------
> rails s --binding=127.0.0.1
> rails s -p 3001
> rails s -e production ... # this wil require to build assets ?????
rake secret -> config/initializers/secret_token.rb
FFI Issues on mac !!!!
----------------------
dyld: lazy symbol binding failed: Symbol not found: _ffi_prep_closure_loc
Referenced from: /Users/isalem/.rvm/gems/ruby-2.7.0@rapidfire/gems/ffi-1.13.1/lib/ffi_c.bundle
Expected in: flat namespace
dyld: Symbol not found: _ffi_prep_closure_loc
Referenced from: /Users/isalem/.rvm/gems/ruby-2.7.0@rapidfire/gems/ffi-1.13.1/lib/ffi_c.bundle
Expected in: flat namespace
brew install libffi ..
libffi is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
For compilers to find libffi you may need to set:
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export CPPFLAGS="-I/usr/local/opt/libffi/include"
For pkg-config to find libffi you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
gem 'ffi', '~> 1.12.2'
The bundle currently has ffi locked at 1.13.1.
Try running `bundle update ffi`
If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`
.. rm Gemfile.lock
.. bundle install
Configurations
=========================================================================================
actioncable
-------------------------------------------------------------------------
# rails requires redis to be installed
- used by actioncable
active job
-------------------------------------------------------------------------
# for activejob .. it's in memory, if you used delayed_job then it's in database, if sidekiq .. redis
- activestorage
------------------------------------------------------------------------
production.rb:
config.active_storage.service = :local
- Assets / For minifyng css & javascript .. (esbuild)
------------------------------------------------------------
- compile
> bin/rails log:clear tmp:clear
* in production.rb make sure from where assets should be loaded
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
> rails tmp:clear # remove tmp/cache
> rails assets:clean[keep] # Remove old compiled assets
> rails assets:precompile # Compile all the assets named in config.assets.precompile
> rails assets:clobber # Remove compiled assets (and app/assets/build)
rails assets:environment # Load asset compile environment
rails cache_digests:dependencies # Lookup first-level dependencies for TEMPLATE (like messages/show or comments/_comment.html)
rails cache_digests:nested_dependencies # Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)
rails css:build # Build your CSS bundle
rails css:clobber # Remove CSS builds
Rails.application.config.assets.compress = true
# SassC::SyntaxError: Error: Function hsla is missing argument $saturation.
> Remove the sassc-rails gem.
In file postcss.config.js
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss/nesting'), <---- this will do the job of sassc
require('tailwindcss'),
require('autoprefixer'),
]
}
but first
yarn install -D postcss-nesting
- database preparations
-------------------------
> RAILS_ENV=production rails db:reset ? This is forbidden in production since it will destroy and create the db
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
Instead
> RAILS_ENV=production rails db:setup # running again won't make any difference ..
Or
> RAILS_ENV=production rails db:prepare # create db if not exist, or runs migration if db exists
> RAILS_ENV=production rails db:setup
> RAILS_ENV=production rails feeds:quran # This is a task that loads sql file into the database
# rails db < #{path}/sqlite_quran.sql
# https://guides.rubyonrails.org/active_record_encryption.html
> bin/rails db:encryption:init
active_record_encryption:
primary_key: iRZzTHQc3pKnDchzSeXNsRbB6Jjx8Xz6
deterministic_key: KMNi4vXhJ9cpoiEngG5Glyq2jAB5E642
key_derivation_salt: 8DD4CLTdX8vXfZDWDePGAC3KEhoELjI7
- Setup Keys
-------------
`validate_secret_key_base': Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)
> bin/rails credentials:edit
> EDITOR="mate --wait" bin/rails credentials:edit
No,
EDITOR=vim rails credentials:edit
Remove config/master.key if you had to ... (changed key)
rm config/master.key
rm config/credentials.yml.enc
EDITOR=vim rails credentials:edit
- add secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> # take the key
- .bash_profile
export SECRET_KEY_BASE="a720feb188850db37612fad94b21e71fb869e9843c6b4da34803f65097b8f0cb30e1b46190ea0838d10dd9860bac3329937981787da4dd20827c95efcaa01ac5"
EDITOR=vim rails credentials:edit
- cache store & active job
------------------------------------------------------------------------
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "rails7e_production"
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
- Optimize images
------------------------------------------------------------------------
sudo apt install jpegoptim
152 sudo apt install optipng
153 ls -l public/assets/
154 optipng public/assets/*.png
155 jpegoptim public/assets/jpg
156 jpegoptim public/assets/*.jpg
157 jpegoptim -m70 public/assets/jpg
158 jpegoptim -m70 public/assets/*.jpg
Github
===========================================================================================
- Prepare your account
- create an access token (full) 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
- Install gh CLI from: https://docs.github.com/en/github-cli/github-cli/about-github-cli
> gh auth login
- github.com
- pick SSH (make sure you have your public key on github) : https://github.com/settings/keys
> gh repo create
- new repo / or use local git ready ?
- .
- repo name
- public / private
- Add the remote
- git remote add origin [email protected]:asfour75/rails7e.git
Cerrtificate with Let's Encrypt it
------------------------------------------------------------------------------------------------------------
> sudo snap install --classic certbot
> sudo ln -s /snap/bin/certbot /usr/bin/certbot
> sudo certbot --nginx
Using Puma
-------------------------------------------------------------------------------------------------------------
- Rails 7, using puma by default
> rails s -p 3001 -e production
With nginx
------------------------------------------------------------------------------------------------------------
- You run production
http {
...
server {
...
location / {
proxy_pass http://127.0.0.1:3004;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
proxy_http_version 1.1 - Defines the HTTP protocol version for proxying, by default it it set to 1.0. For Websockets and keepalive connections you need to use the version 1.1.
proxy_cache_bypass $http_upgrade - Sets conditions under which the response will not be taken from a cache.
Upgrade $http_upgrade and Connection "upgrade" - These header fields are required if your application is using Websockets.
Host $host - The $host variable in the following order of precedence contains: hostname from the request line, or hostname from the Host request header field, or the server name matching a request.
X-Real-IP $remote_addr - Forwards the real visitor remote IP address to the proxied server.
X-Forwarded-For $proxy_add_x_forwarded_for - A list containing the IP addresses of every server the client has been proxied through.
X-Forwarded-Proto $scheme - When used inside an HTTPS server block, each HTTP response from the proxied server is rewritten to HTTPS.
X-Forwarded-Host $host - Defines the original host requested by the client.
X-Forwarded-Port $server_port - Defines the original port requested by the client.
** Notice
------------------------------------------------------------------------
Rails 7.0.1 has some issues with attachments (token) fixed in 7.0.2.X
in ffi_lib': Could not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory. (LoadError)
> sudo apt install libvips
Rails new 7 (esbuild) + Propshaft
===========================================================================================
> ruby 3 / rails 7
> rails new rails7b -js esbuild --css bootstrap
# https://www.driftingruby.com/episodes/esbuild-for-rails
1979 bundle add dotenv-rails
1980 bundle install
1981 bin/setup-no-docker
1982 rails db:seed
1983 bundle exec rake spree_sample:load
1984 bin/setup-no-docker
1985 cd vue-storefront-spree/
1986 yarn dev
1987 nvm use 14
1988 yarn dev
1989 sudo service
1990 sudo service postgresql start
1991 sudo service postgresql status
1992 sudo service redis-server status
1993 history
1994 export BACKEND_URL=http://localhost:4000
1995 yarn dev
1996 dpkg -h
1997 dpkg --h
1998 dpkg --help
1999 dpkg -i google-chrome-stable_current_amd64.deb
2000 sudo dpkg -i google-chrome-stable_current_amd64.deb
2001 cd Projects/rails7e
2002 bin/dev
2003 ruby -v
2004 rvm list
2005 rvm use ruby-3.1.0@rails7e --create
2006 vim .rvmrc
2007 vim Gemfile
2008 vim .rvmrc
2009 bundle install
2010 bin/dev
2011 rails asstes:precompile
2012 rails asste:precompile
2013 rails assets:precompile
2014 rails s -e production
2015 rails g motor:install && rake db:migrate
2016 rails s -e production
2017 rails tmp:clear
2018 RAILS_ENV=production rails db:setup
2019 RAILS_ENV=production rails db:migrate
2020 RAILS_ENV=production rails db:seed
2021 RAILS_ENV=production rails db:seeds
2022* RAILS_ENV=production rails db:
2023 RAILS_ENV=production rails db:seed --trace
2024 RAILS_ENV=production rails db:migrate
2025 rails s -e production
2026 RAILS_ENV=production rails asstes:precompile
2027 RAILS_ENV=production rails assets:precompile
2028 rails tmp:clear
2029 rails assets:tmp:clear
2030 rails assets:clear
2031 rails assets:tmp:clean
2032 rails assets:clean
2033 RAILS_ENV=production rails assets:precompile
2034 bundle
2035 RAILS_ENV=production rails assets:precompile
2036 raila assets:clean
2037 rails assets:clean
2038 rails assets:tmp:clean
2039 rails assets:clean
2040 rails tmp:clean
2041 rails tmp:clear
2042 RAILS_ENV=production rails assets:precompile
2043 vim /home/isalem/.rvm/gems/ruby-3.1.0@rails7e/bundler/gems/rails_admin-9196932a3ea5/vendor/assets/javascripts/rails_admin/popper.js
2044 bin/dev
2045 bundle
2046 RAILS_ENV=production rails assets:precompile
2047 rails s -e production
2048 vim log/production.log
2049 rails s -e production
2050 RAILS_ENV=production rails assets:clean
2051 RAILS_ENV=production rails assets:precompile
2052 rails s -e production
2053 export RAILS_SERVE_STATIC_FILES=true
2054 rails s -e production
2055 history