I have a bunch of rspec test that are running fine when I don't freeze them
in the vendor folder.

But when I freeze the rails gems, the spec starts failing with the stack

/home/xuser/myprojects/xproject/config/../vendor/rails/railties/lib/initializer.rb:271:in
`require_frameworks': can't activate rack (~> 1.0.1, runtime) for [],
already activated rack-1.1.0 for ["rspec-rails-1.3.2"] (RuntimeError)
    from
/home/xuser/myprojects/xproject/config/../vendor/rails/railties/lib/initializer.rb:134:in
`process'
    from
/home/xuser/myprojects/xproject/config/../vendor/rails/railties/lib/initializer.rb:113:in
`send'
    from
/home/xuser/myprojects/xproject/config/../vendor/rails/railties/lib/initializer.rb:113:in
`run'
    from /home/xuser/myprojects/xproject/config/environment.rb:9
    from /home/xuser/myprojects/xproject/spec/spec_helper.rb:4:in `require'
    from /home/xuser/myprojects/xproject/spec/spec_helper.rb:4
    from
/home/xuser/myprojects/xproject/spec/controllers/spec_helper.rb:1:in
`require'
    from /home/xuser/myprojects/xproject/spec/controllers/spec_helper.rb:1
    from
/home/xuser/myprojects/xproject/spec/controllers/users_controller_spec.rb:1:in
`require'
    from
/home/xuser/myprojects/xproject/spec/controllers/users_controller_spec.rb:1
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:in
`load'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:in
`load_files'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:in
`each'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:in
`load_files'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/options.rb:133:in
`run_examples'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in
`run'
    from /home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/bin/spec:5

I zeroed down the error to this line in spec_helper in spec folder

> require
File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))

But when I remove this line the specs starts failing with the below stack

/home/xuser/myprojects/xproject/spec/spec_helper.rb:5:in `require': no such
file to load -- spec/rails (LoadError)
    from /home/xuser/myprojects/xproject/spec/spec_helper.rb:5
    from
/home/xuser/myprojects/xproject/spec/controllers/spec_helper.rb:1:in
`require'
    from /home/xuser/myprojects/xproject/spec/controllers/spec_helper.rb:1
    from
/home/xuser/myprojects/xproject/spec/controllers/users_controller_spec.rb:1:in
`require'
    from
/home/xuser/myprojects/xproject/spec/controllers/users_controller_spec.rb:1
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:in
`load'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:in
`load_files'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:in
`each'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:in
`load_files'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/options.rb:133:in
`run_examples'
    from
/home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in
`run'
    from /home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/bin/spec:5


Is there anything I am missing ? I want to freeze my gems and check them in
with the application.

Regards,
Amiruddin Nagri,
Bangalore, 560008, KA
India

Y! IM : amir_na...@yahoo.com
GTalk : amir.na...@gmail.com
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to