rubygems - "uninitialized constant" when running RSpec tests with Rails 2.3.8 and Bundler -


I changed my Rail2.3.8 project to load the gems using the bundler instead of the default rail 2.3 loading mechanism. Have given. I followed and scored fine in the development of the site. I use RVM for gem management, and a specific gemset is loaded for the app.

My RSPC is unable to run the trial suite, though. I have tried to run the entire suite and single tests using different types of commands:

  autospec # My usual way of running the test rake spec spec spec / models / comment_spec.rb # I'm trying to run a prefixed file with the  bundle exec  i'm trying to file a single fantasy file in Ruby Speck / Model / comment_spec.rb  

Isolation. . Everything gives the same error:

  / user / casper/.rvm/gems/ruby-1.8.7-p248@darebusters/gems/activesupport-2.3.8/lib/active_support/ Dependencies RB: 440: In `load_missing_constant ': uninitialized continuous InheritedResources :: Base (NameError) /Users/casper/.rvm/gems/ruby-1.8.7-p248@darebusters/gems/activesupport-2.3.8/lib/active_support From /dependencies.rb:80:IN 'const_missing_not_from_s3_library' /Users/casper/.rvm/gems/ruby-1.8.7-p248@darebusters/gems/aws-s3-0.6.2/lib/aws/s3/extensions RB: 206: Derebusters in 'const_missing' from /Users/casper/Projects/cf/darebusters/app/controllers/admin/base_controller.rb:1/Users/casper/.rvm/gems/ruby-1.8.7-p248@ / Gemstones / active-support -2.3.8 / lib / active_support / dependencies RB: 158: From 'Users' / Users / Casper /. RVM / Games / RBI-1.8.7-P 248 @ Darebusters / Games / ActiveSport-2.3.3 to .8 / lib / active_support / dependencies.rb: 158: From 'User' / Users / Casper / RVM / Games / RBI-1.8.7-P248 @Darbusters / Jams / ActiveSport-2.3.3 / LB / /active_support/dependencies.rbazines65:in/users/casper/.rvm/gems/ruby-1.8.7-p248 In `require_or_load 'from @darebusters / gems / activesupport-2.3.8 / lib / active_support / dependencies.rb: 224: to' depend_on 'in / users / casper/.rvm/gems/ruby-1.8.7-p248@darebusters /gems/activesupport-2.3.8/lib/active_support/dependencies.rb:136:in 'need_dependency' / user / casper /. RVM / Games / RB-1-1.8.7- P248 @Darbusters / Games / RIS-2.3.3 / LIB / InLilizer RBI 14: In / Loaders / Casper /. 'Load_Applications_classes' from RVM / Games /ruby-1.8.7-p248@darebusters/gems/rails-2.3.8/lib/initializer.rb:13:IN/users/casper/.rvm/gems/ruby-1.8 7-p248 @ from 'Every' Darebusters / Gems / Rail -2.3.8 / Leib / RILIR RB: 413: /Users/casper/.rvm/gems/ruby-1.8.7-p248@darebusters/gems/rails-2.3.8 from `load_application_square 'in /lib/initializer.rb:411:in/users/ Casper/.rvm/gems/ruby-1.8.7-p248@darebusters/gems/rails-2.3.8/lib/initializer.rb: from '411' each '/Users/casper/.rvm/gems/ruby-1 In 'load_application_classes' .8.7-P248 @ Darebusters / Gems / Rail -2.3.8 / Leib / Initial RB: 197: / User / Casper /. Rail -2.3.8 / Leib / Initials in 'Process' from RWM / Games / RBI-1.8.7-P 248 @ Darebusters / Games / RB: 113: / User / Kaiser /. R.V.M. .br / 113 / /sas/casper/Projects/cf/darebusters/config/environment.rb In "Send" from / games / RBI-1.8.7-p248@darebusters/gems/rails-2.3.8/lib/initializer : 1: / require / users / casper / project / cf / darebusters / spec from `spec / models / comment_spec.rb in` run 'from / users / casper / projects / cf / darebusters / spec / spec_helper.rbitter: 9 Required on /spec_helper.rb: 1: 'Requirement' from Spectral / Model / Comment_spcRB: 1  I'm pretty sure this problem is not related to the Inherited Resource Mani - I think that at this point the jewels are not fully loaded, and inh Rited Resources requiring only first. 

This thing that bothers me is that / app / for /activesupport.2.3.8/lib/active_support/dependencies.rb:158 Controllers / admin / base_controller requires dur to enter the initial step. It should not do this, and it certainly does not do this in development mode. I can comment in my comment about 'legacy legacy', and the site still runs, it is not as long as no such action is taken that loads a controller. I use the inherited resources I get the "uninitialized constant" error.

For clarity, it's mine.

Even the old question, but I had the same problem with bundler 1.0.3, -Rail 1.3.3 & amp; Rail was able to boil it up to 2.3.8 and notable_arles. Remarkable-rail seems to be running by rail environment before rspec / initializers to load

after adding:. => Requires this to be done in Gemfile and after the need of hand in spec_helper does not require equal rail-environment this issue disappears.


Comments