rails command line
rails new app_name #creates a new rails application
rails server or rails s #runs the rails server
rails generate or rails g #gives a list of available generators
rails console or rails c #opens up the rails console that allows you
# to interact with your rails application
rails destroy or rails d #allows you to destroy what was previously created
# ex: rails g model Oops - creates
# ex: rails d model Oops - deletes what was created
rails about #gives info about your ruby application including the version, etc.
rails -T #opens up the rails tasks list to give you info on what you can run.
rails db: #most common command, allows you to run create or migrate
#ex: rails db:migrate - runs the migration
#ex: rails db:seed - seeds your DB from what was added in your seed file
Are there any code examples left?
New code examples in category Ruby
-
Ruby 2022-03-27 15:25:03 ruby assign value to hash
-
Ruby 2022-03-25 05:05:10 test if array empty ruby
-
Ruby 2022-03-24 20:45:17 rails update without validation
-
Ruby 2022-03-23 06:15:08 ruby hello world
-
Ruby 2022-03-23 03:40:01 rails keep all params except for some
-
Ruby 2022-03-20 07:15:08 rails hidden field default value
-
Ruby 2022-03-19 20:55:31 print things ruby
-
Ruby 2022-03-18 09:10:03 ruby get the number of same element in array
-
Ruby 2022-03-17 03:40:17 drop rails all db