s.ross
2008-Dec-23 19:42 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
I''m running into a problem getting any results from Cucumber at this point. I was able to a while ago, but I upgraded to Rails 2.2.2 and poof! No Cucumber. Any thoughts what might be wrong? Rails 2.2.2 Cucumber 0.1.13 Webrat aslakhellesoy-webrat (0.3.2.1) rspec (1.1.11) rspec-rails (1.1.11) All are installed as gems and there are no traces in vendor/plugins. Stack trace included in case it provides extra info...thanks! vendor/rails/activerecord/lib/../../activesupport/lib/active_support/ dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher (NameError) from /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ activesupport/lib/active_support/dependencies.rb:453:in `const_missing'' from /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ activesupport/lib/active_support/dependencies.rb:465:in `const_missing'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ cucumber/rails/world.rb:18 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:in `gem_original_require'' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:in `require'' from /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ activesupport/lib/active_support/dependencies.rb:495:in `require'' from /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' from /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ activesupport/lib/active_support/dependencies.rb:495:in `require'' from ./features/support/env.rb:4 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:in `gem_original_require'' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:in `require'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ cucumber/cli.rb:230:in `require_files'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ cucumber/cli.rb:228:in `each'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ cucumber/cli.rb:228:in `require_files'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ cucumber/cli.rb:152:in `execute!'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ cucumber/cli.rb:13:in `execute'' from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/cucumber:6
Maurício Linhares
2008-Dec-23 19:46 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
I had a problem just like this with "has_many_polymorphs" and it was a bad require ( it was requiring "dispatcher" when it should be requiring "action_controller/dispatcher") Maybe a "require ''action_controller/dispatcher''" could solve your issue. - Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Tue, Dec 23, 2008 at 4:42 PM, s.ross <cwdinfo at gmail.com> wrote:> I''m running into a problem getting any results from Cucumber at this point. > I was able to a while ago, but I upgraded to Rails 2.2.2 and poof! No > Cucumber. Any thoughts what might be wrong? > > Rails 2.2.2 > Cucumber 0.1.13 > Webrat aslakhellesoy-webrat (0.3.2.1) > rspec (1.1.11) > rspec-rails (1.1.11) > > All are installed as gems and there are no traces in vendor/plugins. > > Stack trace included in case it provides extra info...thanks! > > vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:266:in > `load_missing_constant'': uninitialized constant Dispatcher (NameError) > from > /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in > `const_missing'' > from > /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in > `const_missing'' > from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/rails/world.rb:18 > from > /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from > /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' > from > /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > `require'' > from > /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in > `new_constants_in'' > from > /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > `require'' > from ./features/support/env.rb:4 > from > /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from > /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' > from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/cli.rb:230:in > `require_files'' > from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/cli.rb:228:in > `each'' > from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/cli.rb:228:in > `require_files'' > from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/cli.rb:152:in > `execute!'' > from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/cli.rb:13:in > `execute'' > from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/cucumber:6 > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
s.ross
2008-Dec-23 22:04 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
Hello-- On Dec 23, 2008, at 11:46 AM, Maur?cio Linhares wrote:> I had a problem just like this with "has_many_polymorphs" and it was a > bad require ( it was requiring "dispatcher" when it should be > requiring "action_controller/dispatcher") > > Maybe a "require ''action_controller/dispatcher''" could solve your > issue. > - > Maur?cio Linhares > http://alinhavado.wordpress.com/ (pt-br) | http:// > blog.codevader.com/ (en)A bit stranger than that, I''m afraid. A fresh Rails project works with cucumber right out of the box. This older one, recently upgraded to 2.2.2, has the problem with dependencies.rb. The main difference is that the fresh project is using gem rails and the real one vendor rails. I was hoping this would be one of those d''oh! kind of problems that everyone knew the answer to :) -s> On Tue, Dec 23, 2008 at 4:42 PM, s.ross <cwdinfo at gmail.com> wrote: >> I''m running into a problem getting any results from Cucumber at >> this point. >> I was able to a while ago, but I upgraded to Rails 2.2.2 and poof! No >> Cucumber. Any thoughts what might be wrong? >> >> Rails 2.2.2 >> Cucumber 0.1.13 >> Webrat aslakhellesoy-webrat (0.3.2.1) >> rspec (1.1.11) >> rspec-rails (1.1.11) >> >> All are installed as gems and there are no traces in vendor/plugins. >> >> Stack trace included in case it provides extra info...thanks! >> >> vendor/rails/activerecord/lib/../../activesupport/lib/ >> active_support/dependencies.rb:266:in >> `load_missing_constant'': uninitialized constant Dispatcher >> (NameError) >> from >> /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ >> activesupport/lib/active_support/dependencies.rb:453:in >> `const_missing'' >> from >> /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ >> activesupport/lib/active_support/dependencies.rb:465:in >> `const_missing'' >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/rails/world.rb:18 >> from >> /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require'' >> from >> /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in >> `require'' >> from >> /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ >> activesupport/lib/active_support/dependencies.rb:495:in >> `require'' >> from >> /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ >> activesupport/lib/active_support/dependencies.rb:342:in >> `new_constants_in'' >> from >> /Users/sxross/rails/fly/vendor/rails/activerecord/lib/../../ >> activesupport/lib/active_support/dependencies.rb:495:in >> `require'' >> from ./features/support/env.rb:4 >> from >> /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require'' >> from >> /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in >> `require'' >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/cli.rb:230:in >> `require_files'' >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/cli.rb:228:in >> `each'' >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/cli.rb:228:in >> `require_files'' >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/cli.rb:152:in >> `execute!'' >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/cli.rb:13:in >> `execute'' >> from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/ >> cucumber:6 >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Maurício Linhares
2008-Dec-23 22:13 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
On Tue, Dec 23, 2008 at 7:04 PM, s.ross <cwdinfo at gmail.com> wrote:> Hello-- > > A bit stranger than that, I''m afraid. A fresh Rails project works with > cucumber right out of the box. This older one, recently upgraded to 2.2.2, > has the problem with dependencies.rb. The main difference is that the fresh > project is using gem rails and the real one vendor rails. > > I was hoping this would be one of those d''oh! kind of problems that everyone > knew the answer to :) >Geez. Same trouble here. In a blank project everything works out of the box, on the real project (with a vendored rails 2.2.2) it just doesn''t work. And only in testing, the application itself runs completely fine. - Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
Mischa Fierer
2008-Dec-23 22:26 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
from /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/rails/world.rb:18 Here''s line 18: Dispatcher.class_eval do def self.failsafe_response(output, status, exception = nil) raise exception end end I would do the following: 1) Try it with gem rails on the old project 2) If that works, then maybe removing then re-adding vendor/rails will do the trick. 3) If that doesnt work, then maybe try messing with that file above and see what''s going wrong. M On Tue, Dec 23, 2008 at 2:13 PM, Maur?cio Linhares < mauricio.linhares at gmail.com> wrote:> On Tue, Dec 23, 2008 at 7:04 PM, s.ross <cwdinfo at gmail.com> wrote: > > Hello-- > > > > A bit stranger than that, I''m afraid. A fresh Rails project works with > > cucumber right out of the box. This older one, recently upgraded to > 2.2.2, > > has the problem with dependencies.rb. The main difference is that the > fresh > > project is using gem rails and the real one vendor rails. > > > > I was hoping this would be one of those d''oh! kind of problems that > everyone > > knew the answer to :) > > > > Geez. > > Same trouble here. In a blank project everything works out of the box, > on the real project (with a vendored rails 2.2.2) it just doesn''t > work. And only in testing, the application itself runs completely > fine. > > - > Maur?cio Linhares > http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081223/4457124f/attachment.html>
Maurício Linhares
2008-Dec-23 22:31 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
Also, the name isn''t Dispatcher anymore, it''s ActionController::Dispatcher. - Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Tue, Dec 23, 2008 at 7:26 PM, Mischa Fierer <f.mischa at gmail.com> wrote:> from > /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/cucumber/rails/world.rb:18 > > Here''s line 18: > > Dispatcher.class_eval do > def self.failsafe_response(output, status, exception = nil) > raise exception > end > end > > I would do the following: > > 1) Try it with gem rails on the old project > 2) If that works, then maybe removing then re-adding vendor/rails will do > the trick. > 3) If that doesnt work, then maybe try messing with that file above and see > what''s going wrong. > > M > > > On Tue, Dec 23, 2008 at 2:13 PM, Maur?cio Linhares > <mauricio.linhares at gmail.com> wrote: >> >> On Tue, Dec 23, 2008 at 7:04 PM, s.ross <cwdinfo at gmail.com> wrote: >> > Hello-- >> > >> > A bit stranger than that, I''m afraid. A fresh Rails project works with >> > cucumber right out of the box. This older one, recently upgraded to >> > 2.2.2, >> > has the problem with dependencies.rb. The main difference is that the >> > fresh >> > project is using gem rails and the real one vendor rails. >> > >> > I was hoping this would be one of those d''oh! kind of problems that >> > everyone >> > knew the answer to :) >> > >> >> Geez. >> >> Same trouble here. In a blank project everything works out of the box, >> on the real project (with a vendored rails 2.2.2) it just doesn''t >> work. And only in testing, the application itself runs completely >> fine. >> >> - >> Maur?cio Linhares >> http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
s.ross
2008-Dec-23 22:49 UTC
[rspec-users] Cucumber: dependencies.rb:266:in `load_missing_constant'': uninitialized constant Dispatcher
Bingo! module ActionController Dispatcher.class_eval do def self.failsafe_response(output, status, exception = nil) raise exception end end end And it works with vendor rails. (It would break every story run against versions < 2.2.2, but that''s another issue.) Gem rails of the 2.2.2 variety is an unexpectedly hard upgrade. Odd stuff shifted around, breaking stuff in random places. Well, enough griping from me. Thanks for getting me back to work! --s On Dec 23, 2008, at 2:31 PM, Maur?cio Linhares wrote:> Also, the name isn''t Dispatcher anymore, it''s > ActionController::Dispatcher. > > - > Maur?cio Linhares > http://alinhavado.wordpress.com/ (pt-br) | http:// > blog.codevader.com/ (en) > > > > On Tue, Dec 23, 2008 at 7:26 PM, Mischa Fierer <f.mischa at gmail.com> > wrote: >> from >> /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.13/bin/../lib/ >> cucumber/rails/world.rb:18 >> >> Here''s line 18: >> >> Dispatcher.class_eval do >> def self.failsafe_response(output, status, exception = nil) >> raise exception >> end >> end >> >> I would do the following: >> >> 1) Try it with gem rails on the old project >> 2) If that works, then maybe removing then re-adding vendor/rails >> will do >> the trick. >> 3) If that doesnt work, then maybe try messing with that file above >> and see >> what''s going wrong. >> >> M >> >> >> On Tue, Dec 23, 2008 at 2:13 PM, Maur?cio Linhares >> <mauricio.linhares at gmail.com> wrote: >>> >>> On Tue, Dec 23, 2008 at 7:04 PM, s.ross <cwdinfo at gmail.com> wrote: >>>> Hello-- >>>> >>>> A bit stranger than that, I''m afraid. A fresh Rails project works >>>> with >>>> cucumber right out of the box. This older one, recently upgraded to >>>> 2.2.2, >>>> has the problem with dependencies.rb. The main difference is that >>>> the >>>> fresh >>>> project is using gem rails and the real one vendor rails. >>>> >>>> I was hoping this would be one of those d''oh! kind of problems that >>>> everyone >>>> knew the answer to :) >>>> >>> >>> Geez. >>> >>> Same trouble here. In a blank project everything works out of the >>> box, >>> on the real project (with a vendored rails 2.2.2) it just doesn''t >>> work. And only in testing, the application itself runs completely >>> fine. >>> >>> - >>> Maur?cio Linhares >>> http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ >>> (en) >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users