1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Using rails.vim

By

  • Running Generators

    The :Rgenerate command can be used to run generators. To generate a new Post model, for example, run the :Rgenerate model post.

  • Running the Server

    The :Rserver command will run any servers configured to run. The server will run in the background, returning control of Vim to you.

  • Running Rake Tasks

    Rake tasks can be run with the :Rake command. So, to run the db:create:all task, run the :Rake db:create:all command.

  • Running Scripts

    Any of the scripts in the scripts/ directory can be run with the :Rscript command. This can be used to run any scripts that don't have specific commands associated with them. If, for example, you wanted to destroy the Post model, you can run the command :Rscript destroy model post.

  1. About.com
  2. Technology
  3. Ruby
  4. Ruby on Rails
  5. Running Scripts

©2014 About.com. All rights reserved.