On Jul 30, 2010, at 7:47 AM, Amit Jain wrote:

> David Chelimsky wrote:
>> On Jul 30, 2010, at 6:52 AM, Amit Jain wrote:
>> 
>>>>> from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511
>>> 
>>>               config.gem "rspec-rails", :version => ">= 1.3.2"
>> 
>> OK - so the problem now is that you've got rspec-rails 2.0.0.beta 
>> installed and that satisfies the ">= 1.3.2" gem requirement, but it only 
>> works with Rails 3. Try changing that to this:
>> 
>>  config.gem "rspec-rails", :version => "~> 1.3.2"
>> 
>> The "~>" matches any gem versions that begin with 1.3, so if you later 
>> upgrade to 1.3.3 it will still work, but it won't match 2.0.0.xxx.
>> 
>> Also, try running with the "rake spec" command before using rcov, which 
>> adds complexity to the mix.
> 
> Hi After adding
>          config.gem "rspec-rails", :version => "~> 1.3.2"
> line in config/environment.rb file. i am getting such type of error.
> 
> [a...@localhost MyApplication]$ ruby script/server
> 
> => Booting WEBrick
> => Rails 2.3.4 application starting on http://0.0.0.0:3000
> can't activate rspec-rails (= 2.0.0.beta.19, runtime) for [], already 
> activated rspec-rails-1.3.2 for []
> /usr/lib/ruby/site_ruby/1.8/rubygems.rb:230:in `activate'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
> /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
>  
> `require'
> /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in
>  
> `new_constants_in
> /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
>  
> `require'
> /home/Amit/Myworkspace/MyApplication/vendor/rails/railties/lib/commands/server.rb:84
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
> `gem_original_require'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
> script/server:3
> Missing these required gems:
>  rspec-rails  ~> 1.3.2
> 
> You're running:
>  ruby 1.8.6.399 at /usr/bin/ruby
>  rubygems 1.3.6 at /home/Amit/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
> 
> Run `rake gems:install` to install the missing gems.
> ---------------------------------------------------------
> 
> I try $ rake gems:install but not install any thing and i also try
> 
> [r...@localhost MyApplication]# gem uninstall rspec-rails-1.3.2
> ERROR:  While executing gem ... (Gem::InstallError)
>    cannot uninstall, check `gem list -d rspec-rails-1.3.2`
> [r...@localhost MyApplication]# `gem list -d rspec-rails-1.3.2`
> [r...@localhost MyApplication]#
> 
> I don't know about this error and why it is coming.

Try this:

gem install rspec-rails --version "1.3.2"

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to