Error while running rspec after unpacking rails gems

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:inprocess’
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:inrun’
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:inrequire’
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:inload’
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:ineach’
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:inrun_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:inrequire’
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:inload’
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:ineach’
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:inrun_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 N.,
Bangalore, 560008, KA
India

Y! IM : [email protected]
GTalk : [email protected]

On Jun 8, 2010, at 4:05 AM, Amiruddin N. wrote:

from /home/xuser/myprojects/xproject/spec/spec_helper.rb:4
from /home/xuser/.gem/ruby/1.8/gems/rspec-1.3.0/bin/spec:5

Try using ‘script/spec’ instead of ‘spec’.

Hi David,

I am using autospec and it by default runs using ‘spec’ rather than
‘script/spec’. Can you give me a quick direction of how to configure it
to
use the former.

Thanks,
Amiruddin N.,
Bangalore, 560008, KA
India

Y! IM : [email protected]
GTalk : [email protected]

On Jun 9, 2010, at 4:45 PM, Amiruddin N. wrote:

Hi David,

I am using autospec and it by default runs using ‘spec’ rather than ‘script/spec’. Can you give me a quick direction of how to configure it to use the former.

Take a look at
http://github.com/rspec/rspec-core/blob/master/Upgrade.markdown.

HTH,
David