Topic: [Solved]Empty view folder with controller generator/javascript runtime

Hi guys,

I've used rails some time ago, and now I installed rails and Ubuntu again but I think I have some problem in my installation.

1) Everytime I create a new project I have add a javascript runtime, such as therubyracer.. Before, I didn't have to do this.. Is there anyway to use it as default?

2) And the most important, when I generate a controller it doesn't gerenate the views.. What's happening?

Are these installation problems?

Last edited by Tipertuba (2012-07-24 09:17:19)

Re: [Solved]Empty view folder with controller generator/javascript runtime

Oh crap, lol I have bad memory..
instead of using

rails g controller car

I should use this plus what action I want.. I forgot that view is only completely generated in scaffold.. so I should use:

rails g controller car new

oh well, I'm writing this because I saw some people with the same doubt..
so if you are reading this and want the view generated, either use "rails g controller modelname actionname" or "rails g scaffold car name:string model:string"

and about the javascript runtime, just do:

sudo apt-get install nodejs

smile

I hope that helps..