2

I've installed rails.vim plugin. Running :Rails! command shows: rails.vim 4.3. But when I try to run :Rails myapp it opens command line (cmd.exe) that shows:

C:\Windows\system32\cmd.exe /c rails myapp. Bunch of rails help comes up and nothing happens. There is have to be something I'm missing.

I use gvim v7.3. rails 3.0.5.

My _vimrc has only this:

set nocompatible
syntax on
filetype plugin indent on
4

2 回答 2

1

:Rails myapp is used to create a new rail project in the current working directory by calling the "rails" command.

I think the issue is that "rails myapp" is the syntax fro pre-3.0, and it is now "rails new myapp".

So it seems your Rails.vim is not up to date. (or Rails.vim is broken for RoR > 3.0 ?)

Create your app directly from the console, and use Rails.vim to navigate/refactor it. This is the main interest of using Rails.vim

If you are working on a existing project, you just need to open any *.rb file of the project and you should see [Rails] in the status bar.

From there, all Rails vim command should be available like :Rfind, :Redit, etc.

于 2011-04-14T06:47:21.477 回答
0

You can use :Rails new projectname for Rails 3.

于 2011-07-17T05:22:11.677 回答