The Rails Command Line - Ruby on Rails Guides - 0 views
-
rake --tasks
- ...28 more annotations...
-
rails dbconsole figures out which database you're using and drops you into whichever command line interface you would use with it
-
The console command lets you interact with your Rails application from the command line. On the underside, rails console uses IRB
-
rake about gives information about version numbers for Ruby, RubyGems, Rails, the Rails subcomponents, your application's folder, the current Rails environment name, your app's database adapter, and schema version
-
You can precompile the assets in app/assets using rake assets:precompile and remove those compiled assets using rake assets:clean.
-
You can also use custom annotations in your code and list them using rake notes:custom by specifying the annotation using an environment variable ANNOTATION.
-
rake routes will list all of your defined routes, which is useful for tracking down routing problems in your app, or giving you a good overview of the URLs in an app you're trying to get familiar with.
-
Using generators will save you a large amount of time by writing boilerplate code, code that is necessary for the app to work.
-
With a normal, plain-old Rails application, your URLs will generally follow the pattern of http://(host)/(controller)/(action), and a URL like http://(host)/(controller) will hit the index action of that controller.
-
A scaffold in Rails is a full set of model, database migration for that model, controller to manipulate it, views to view and manipulate the data, and a test suite for each of the above.