Missing script/generate in Rails 3

*爱你&永不变心* 提交于 2019-11-29 16:36:04

问题


I just installed Rails 3 and created my first app. The install of Rails3 + ruby 1.9 went very smoothly but I am missing the generate script in script/generate.

I have created a new app from scratch with no options to verify.

Any idea why this is happening and how to fix it?


回答1:


all script/* commands has been removed from rails 3. You should use rails generate or rails g instead of script/generate, rails server or rails s instead of script/server and so on.




回答2:


try

rails generate ...

the only script existing now is rails all others will be called as parameter of rails.

Take a look a the Ruby on Rails Guides: Getting Started with Rails



来源:https://stackoverflow.com/questions/3024478/missing-script-generate-in-rails-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!