Multitenancy with Rails and rspec

33 views
Skip to first unread message

Travis Lindsey

unread,
Jun 7, 2014, 2:17:28 PM6/7/14
to rubyonra...@googlegroups.com
Hello, I am following this book Multitenancy with Rails. Has anyone here read this book or can shed light on the issue?

When I run rspec i get following errors
rspec spec/features/accounts/sign_up_spec.rb

C:/Users/J/RubymineProjects/subscribem/spec/dummy/config/environments/test.rb:1:in `<top (required)>': undefined me
thod `configure' for #<Dummy::Application:0x416fe08> (NoMethodError)
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `req
uire'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `blo
ck in require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in `loa
d_dependency'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `req
uire'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:591:in `block (2 levels) in <cl
ass:Engine>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:in `block in <class:Engine>
'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in `instance_exec'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:55:in `block in run_init
ializers'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'

        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:in `tsort_each_child'

        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
        from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:54:in `run_initializers'

        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/application.rb:215:in `initialize!'
        from C:/Users/J/RubymineProjects/subscribem/spec/dummy/config/environment.rb:5:in `<top (required)>'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Users/J/RubymineProjects/subscribem/spec/spec_helper.rb:3:in `<top (required)>'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Users/J/RubymineProjects/subscribem/spec/features/accounts/sign_up_spec.rb:1:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `load'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `block in
 load_spec_files'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `load_spe
c_files'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:97:in `setup'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:85:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:70:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:38:in `invoke'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/exe/rspec:4:in `<top (required)>'
        from C:/Ruby200/bin/rspec:23:in `load'
        from C:/Ruby200/bin/rspec:23:in `<main>'

AmritDeep Dhungana

unread,
Jun 8, 2014, 2:16:26 AM6/8/14
to rubyonra...@googlegroups.com
Check you test.rb file in config/environment  folder. So that we can check it. You may miss some configuration in test environment. 

Frederick Cheung

unread,
Jun 8, 2014, 7:10:33 AM6/8/14
to rubyonra...@googlegroups.com
On Saturday, June 7, 2014 7:17:28 PM UTC+1, Travis Lindsey wrote:
> Hello, I am following this book Multitenancy with Rails. Has anyone here read this book or can shed light on the issue?
>
>
> When I run rspec i get following errors
> rspec spec/features/accounts/sign_up_spec.rb
>
>

Just a wild shot in the dark but I think I once saw a similar error when I generated an app with rails 4.1 but then downgraded it to rails 4.0.x

Fred
Reply all
Reply to author
Forward
0 new messages