Why does Ruby “script/generate” return “No such file or directory”?

I am having trouble using script/generate. I am following the tree based navigation tutorial, which says to use script/plugin install git://github.com/rails/acts_as_tree.git or script/generate nifty_layout.

I keep getting:

No such file or directory -- script/plugin

I've tried these variations:

script/generate nifty_layout
rails generate nifty_layout
ruby script/generate nifty_layout
ruby generate nifty_layout

and they all tell me:

-bash: script/generate: No such file or directory

Am I missing something? Total ruby nuby here and I just can't seem to find an answer.

edit: rails 3 on Mac OS X 10.6

Answers


Rails 3 is your problem (or rather the cause of). Since rails 3 all of the "script/whatever" commands have been replaced with "rails whatever".

So now you want "rails generate ..." or "rails server" instead.

Be sure to watch version numbers or post dates when looking at tutorials :) linkage: Missing script/generate in Rails 3


Need Your Help

Value over threshold for n consecutive minutes

sql sql-server-2008

Assume I have a table containing a set of data points, each consisting of a timestamp and a value. How would I write a query that returns true (1) if there are at least N consecutive records (order...

Size limit in UIImageView?

ios objective-c uiimageview uiimage

I'm trying to display a rather big image in a UIImageView. The image downloads correctly (using a NSSessionDownloadTask) and I can create a UIImage from it, however, nothing is displayed in the

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.