The error is a couple steps back up the trace, in rspec's rails.rb.
The problem is that you're running an old version of rspec_on_rails,
which expects ApplicationController to be defined in app/controllers/
application.rb, which it isn't anymore. Upgrading to the new version
of rspec_on_rails will fix this.

--Matt Jones

On Jul 11, 1:46 pm, bekkou68 <[email protected]> wrote:
> Hello all,
>
> I'm bekkou68.
> I have a error on custom_require.rb, which occurred when I execute
> rspec.
>
> I executed the following command.
> $ script/spec spec/models/
>
> Then, I got the following result.
> # /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require': no such file to load -- application
> (MissingSourceFile)
> #     from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `require'
> #     from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/dependencies.rb:158:in `require'
> #     from /home/project/vendor/plugins/rspec_on_rails/lib/spec/
> rails.rb:3
> #     from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `gem_original_require'
> #     from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `require'
> #     from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/dependencies.rb:158:in `require'
> #     from /home/project/spec/models/../spec_helper.rb:6
> #     from /home/project/spec/models/eng_word_spec.rb:1:in `require'
> #     from /home/project/spec/models/eng_word_spec.rb:1
> #     from /home/project/vendor/plugins/rspec/lib/spec/runner/
> example_group_runner.rb:14:in `load'
> #     from /home/project/vendor/plugins/rspec/lib/spec/runner/
> example_group_runner.rb:14:in `load_files'
> #     from /home/project/vendor/plugins/rspec/lib/spec/runner/
> example_group_runner.rb:13:in `each'
> #     from /home/project/vendor/plugins/rspec/lib/spec/runner/
> example_group_runner.rb:13:in `load_files'
> #     from /home/project/vendor/plugins/rspec/lib/spec/runner/
> options.rb:85:in `run_examples'
> #     from /home/project/vendor/plugins/rspec/lib/spec/runner/
> command_line.rb:19:in `run'
> #     from script/spec:4
>
> Here is the contents of custom_require.rb.
> # ============================== from here
> ==============================
> #--
> # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
> # All rights reserved.
> # See LICENSE.txt for permissions.
> #++
>
> require 'rubygems'
>
> module Kernel
>   alias gem_original_require require # :nodoc:
>
>   #
>   # We replace Ruby's require with our own, which is capable of
>   # loading gems on demand.
>   #
>   # When you call <tt>require 'x'</tt>, this is what happens:
>   # * If the file can be loaded from the existing Ruby loadpath, it
>   #   is.
>   # * Otherwise, installed gems are searched for a file that matches.
>   #   If it's found in gem 'y', that gem is activated (added to the
>   #   loadpath).
>   #
>   # The normal <tt>require</tt> functionality of returning false if
>   # that file has already been loaded is preserved.
>   #
>   def require(path) # :nodoc:
>     gem_original_require path
>   rescue LoadError => load_error
>     if load_error.message =~ /#{Regexp.escape path}\z/ and
>        spec = Gem.searcher.find(path) then
>       Gem.activate(spec.name, "= #{spec.version}")
>       gem_original_require path
>     else
>       raise load_error
>     end
>   end
> end  # module Kernel
> # ============================== to here
> ==============================
>
> Should I add 'require xxx' ?
> Are they some wrong codes on custom_require.rb?
> Should I update RubyGems?
>
> I'm really happy if you help me.
>
> Sincerely,
> bekkou68
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to