# Rspec upgrade from 1.2.6 to 2.0.2 and/or 2.1.0

**URL:** <https://www.ruby-forum.com/t/rspec-upgrade-from-1-2-6-to-2-0-2-and-or-2-1-0/142237>\
**Category:** Rails\
**Created:** [July 4, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/rspec-upgrade-from-1-2-6-to-2-0-2-and-or-2-1-0/142237 "2008-07-04T22:15:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [July 4, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/rspec-upgrade-from-1-2-6-to-2-0-2-and-or-2-1-0/142237/1 "2008-07-04T22:15:24Z")

</div>

I am trying to upgrade a Rails 1.2.6 application to either 2.0.2 or  
(preferably) 2.1.0 whichever works. The application has a hugh number  
of rspec tests written. I am having problems getting past the first  
base.  
Details: The application has both rspec (1.1.3) and rspec\_on\_rails  
plugins installed in vendor/plugins directory. The application also had  
Rails 1.2.6 frozen in the vendor directory. When I ran the following  
code snippet in the account\_spec.rb file, it ran fine (with Rails 1.2.6  
frozen in vendor directory).

require File.dirname( **FILE** ) + ‘/…/spec\_helper’

describe Account do  
it “should have valid fixture defaults” do  
create\_account.should be\_valid  
end  
end

“create\_account” exists in the spec\_helper.rb.

Now to upgrade, first in Rails 2.0.2. I removed the Rails directory  
from vendor directory, changed rails version in environment.rb from  
1.2.6 to 2.0.2 and tried to rerun the same file/test as above. The code  
does not even get past the first line of code, i.e., require  
File.dirname …

I get the following exception trace:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:249:in  
`load_missing_constant': Expected /home/bruparel/work/isabont/app/models/employer.rb to define Employer (LoadError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in`const\_missing’  
from  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:465:in  
`const_missing' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:471:in`send’  
from  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:471:in  
`const\_missing’

I am no rspec power user at this point, but have run rspec tests at  
commmand line and in NetBeans IDE for Rails 1.2.x without any problems.  
Thanks for your time.  
Bharat

```
    from

```

/home/bruparel/work/isabont/vendor/plugins/fixture\_replacement/lib/fixture\_replacement/fixture\_replacement\_generator.rb:88:in  
`const_get' from /home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:88:in`add\_to\_class\_singleton’  
from  
/home/bruparel/work/isabont/vendor/plugins/fixture\_replacement/lib/fixture\_replacement/fixture\_replacement\_generator.rb:99:in  
`assign_init_variables' from /home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:38:in`initialize’  
… 15 levels…  
from  
/home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/example\_group\_runner.rb:13:in  
`load_files' from /home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/options.rb:85:in`run\_examples’  
from  
/home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/command\_line.rb:19:in  
`run’  
from /home/bruparel/work/isabont/vendor/plugins/rspec/bin/spec:4

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [July 5, 2008, 12:45am UTC](https://www.ruby-forum.com/t/rspec-upgrade-from-1-2-6-to-2-0-2-and-or-2-1-0/142237/2 "2008-07-05T00:45:15Z")

</div>

The immediate problem has been solved with the help of someone who is  
familiar with it.  
The app used acts\_as\_list and acts\_as\_tree which was getting lost in the  
stack trace. Since Rails 2.x has removed that from core, I had to  
install them as plug-ins. It is working on Rails 2.0.2, next I will  
attempt 2.1
