How to use Rails Scaffold command?


#1

Hello,

I’m not sure how to use Rails scaffold command within Dreamhost. I’m following Rails Tutorial (http://railstutorial.org/chapters/a-demo-app), but I stuck at the moment when I should use scaffold command:

rails generate scaffold User name:string email:string

When I put this command into SSH, I will generate new directory named “generate”. What I’m doing wrong?


#2

The reason it’s not working is that DreamHost runs an old version of rails for which the generate command is different. I think you need to enter

script/generate generate scaffold User name:string email:string

Look at some references for Rails 2.x and you should find what you need.

I’ve just picked up Rails myself, but I’m disappointed to find out that DH doesn’t support rails 3 yet. It sounds like it’s possible to get it running with some work, but DH won’t be any help if something goes wrong. I’m looking into different hosting services. Good luck!

  • Charlie

#3

in case you weren’t aware, they’re in the process of upgrading to Rails 3:

http://www.dreamhoststatus.com/2010/11/09/rails-3-0-1-upgrade/comment-page-1/#comment-253623