I have been trying to extract a partial from an application.html.erb file with the following, :8,14Rextract stylesheets.

I get a return that reads, 'no such directory'.

From this novices perspective, it looks like I am following the example in :help Rextract but then I am never surprised to learn that there is some aspect or other that I am not taking into consideration.

Any help or pointers on how I can get Rextract to work or how to apply it correctly?


Have you tried giving a full path to the file stylesheets? Perhaps vim changed your CWD to something else and you are getting an error because it can't find what you are trying to specify??

  • Hi Zoredache ... thanks for you reply to my posting .... I used the following which is as you suggested, I think. :11,14Rextract layouts/stylesheets ..... and it worked. No surprise to you I suppose but a delightful moment for me. Thanks again. – railsdancer Dec 3 '11 at 20:46
  • Hi ldigas, I am still learning rails but the understanding I have gleaned thus far is that in the layout that I am currently working on there are two ideas. One of these deals with stylesheets and so it is suggested that you pull out the stylesheets into a partial .... it has a formatted name that starts with _stylesheets and in the original file you replace the lines you have extracted with 'render :partial => 'layouts/stylesheets' .... I guess it is much more than this, but that is my understanding to date.... thanks for you interest. – railsdancer Dec 3 '11 at 20:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.