[rspec-users] rspec - undefined method `describe' for main:Object

Luis Lavena luislavena at gmail.com
Sat Oct 11 11:16:19 EDT 2008

On Sat, Oct 11, 2008 at 7:59 AM, Mano ah <lists at ruby-forum.com> wrote:
> I followed the below ways of installation
> gem install rake
> gem install rails
> gem install rspec
> gem install rspec-rails
> rails my-test-app
> cd my-test-app
> ruby script/generate rspec
> When i used
>  'rake spec'
> i received no error.
> After that I created a controller
> then installed the two plugins
>   ruby script/plugin install
> http://rspec.rubyforge.org/svn/tags/CURRENT/rspec
>  ruby script/plugin install
> http://rspec.rubyforge.org/svn/tags/CURRENT/rspec_on_rails

You're pulling a old SVN repository, latest releases are distributed
through Git repo, please see the install instructions in the website:


> Then i used 'ruby script/generate rspec_scaffold myspec_con' which
> created the spec for the controller,model etc
> Then i used the below command to run the spec file and received the
> below error
> D:\Diwakar\my_spec\spec>ruby script/spec
> controllers/myspec_cons_controller_spec
> .rb
> ruby: No such file or directory -- script/spec (LoadError)
> Please give your suggestions

You forgot to:

ruby script/generate rspec

This is required for rspec to work, it generates the needed files in
script and also spec folder to make RSpec work.

Please do that and then try executing ruby script/spec.

FYI: There are plenty of tutorials around the web that explain how to
get started with RSpec. I guess english is not your main language and
can be difficult to search for it, but:

google with keywords "rspec rails getting started":


Luis Lavena
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

More information about the rspec-users mailing list