Amit Jain
2010-Jul-29 10:19 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
Hello, I recently unpacked the latest rspec and rspec rails in my applicaiton. When I run my specs I get: $ rcov user_spec.rb config.gem: Unpacked gem CVS in vendor/gems has no specification file. Run ''rake gems:refresh_specs'' to fix this. config.gem: Unpacked gem CVS in vendor/gems not in a versioned directory. Giving up. config.gem: Unpacked gem rmagick-2.13.1 in vendor/gems has no specification file. Run ''rake gems:refresh_specs'' to fix this. /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'': no such file to load -- application (MissingSourceFile) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'' from /home/Amit/Myworkspace/MyApplication/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:3 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'' from ./../spec_helper.rb:6 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from ./user_spec.rb:1 from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load'' from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 from /usr/bin/rcov:19:in `load'' from /usr/bin/rcov:19 -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Jul-29 11:14 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
On Jul 29, 2010, at 5:19 AM, Amit Jain wrote:> Hello, > I recently unpacked the latest rspec and rspec rails in my > applicaiton.How did you unpack them (what command did you use)?> When I run my specs I get: > > $ rcov user_spec.rbWhere are you typing this command? What happens when you type "rake spec" from the project root?> config.gem: Unpacked gem CVS in vendor/gems has no specification file.This error suggests that you unpacked the gem using "gem unpack" instead of "rake gems:unpack".> Run ''rake gems:refresh_specs'' to fix this. > config.gem: Unpacked gem CVS in vendor/gems not in a versioned > directory. Giving up.And this one suggests that you may have put a CVS plugin directly in the gems folder. Rails wants you to put plugins in vendor/plugins, and use "rake gems:unpack" to install gems in vendor/gems.> config.gem: Unpacked gem rmagick-2.13.1 in vendor/gems has no > specification file. Run ''rake gems:refresh_specs'' to fix this. > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'': no such file to load -- application > (MissingSourceFile) > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from > /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in > `require'' > from > /home/Amit/Myworkspace/MyApplication/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:3What version of rails are you using? rspec_on_rails was replaced by rspec-rails nearly two years ago, when rails was at 2.1.x. If you''re using any version of rails later than 2.1, you should be using the rspec-rails gem.> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from > /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in > `require'' > from ./../spec_helper.rb:6 > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from ./user_spec.rb:1 > from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load'' > from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 > from /usr/bin/rcov:19:in `load'' > from /usr/bin/rcov:19
Amit Jain
2010-Jul-29 11:37 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
David Chelimsky wrote:> On Jul 29, 2010, at 5:19 AM, Amit Jain wrote: >> Hello, >> I recently unpacked the latest rspec and rspec rails in my >> applicaiton. > > How did you unpack them (what command did you use)?I just install rspec gem through the commands: root# gem install rspec root# gem install rcov and ~/mygreatapp/ $ ./script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/plugins/rspec but it''s not work ~/mygreatapp/ $ ./script/generate rspec and then ./script/generate rspec_model User> >> When I run my specs I get: >> >> $ rcov user_spec.rb > > Where are you typing this command? What happens when you type "rake > spec" from the project root? > I run that command in /spec/models directory/spec/models $ rcov user_spec.rb>> config.gem: Unpacked gem CVS in vendor/gems has no specification file. > > This error suggests that you unpacked the gem using "gem unpack" instead > of "rake gems:unpack". > >> Run ''rake gems:refresh_specs'' to fix this. >> config.gem: Unpacked gem CVS in vendor/gems not in a versioned >> directory. Giving up. > > And this one suggests that you may have put a CVS plugin directly in the > gems folder. Rails wants you to put plugins in vendor/plugins, and use > "rake gems:unpack" to install gems in vendor/gems. > >> from >> /home/Amit/Myworkspace/MyApplication/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:3 > > What version of rails are you using? rspec_on_rails was replaced by > rspec-rails nearly two years ago, when rails was at 2.1.x. If you''re > using any version of rails later than 2.1, you should be using the > rspec-rails gem.I am using Rails 2.3.4. -- Posted via http://www.ruby-forum.com/.
Amit Jain
2010-Jul-29 12:24 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
Amit Jain wrote:> David Chelimsky wrote: >> On Jul 29, 2010, at 5:19 AM, Amit Jain wrote: >>> Hello, >>> I recently unpacked the latest rspec and rspec rails in my >>> applicaiton. >> >> How did you unpack them (what command did you use)? > I just install rspec gem through the commands: > root# gem install rspec > root# gem install rcov > > and > > ~/mygreatapp/ $ ./script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/plugins/rspec > > but it''s not work > > ~/mygreatapp/ $ ./script/generate rspec > and then > ./script/generate rspec_model User > >> >>> When I run my specs I get: >>> >>> $ rcov user_spec.rb >> >> Where are you typing this command? What happens when you type "rake >> spec" from the project root? >> I run that command in /spec/models directory > > /spec/models $ rcov user_spec.rb > >>> config.gem: Unpacked gem CVS in vendor/gems has no specification file. >> >> This error suggests that you unpacked the gem using "gem unpack" instead >> of "rake gems:unpack". >> >>> Run ''rake gems:refresh_specs'' to fix this. >>> config.gem: Unpacked gem CVS in vendor/gems not in a versioned >>> directory. Giving up. >> >> And this one suggests that you may have put a CVS plugin directly in the >> gems folder. Rails wants you to put plugins in vendor/plugins, and use >> "rake gems:unpack" to install gems in vendor/gems. >> >>> from >>> /home/Amit/Myworkspace/MyApplication/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:3 >> >> What version of rails are you using? rspec_on_rails was replaced by >> rspec-rails nearly two years ago, when rails was at 2.1.x. If you''re >> using any version of rails later than 2.1, you should be using the >> rspec-rails gem. > > I am using Rails 2.3.4.Hi Devid, Thanks for answer but i am still getting same problem. i am sending one another error: i run this command [root at localhost gems]# rake gems:unpack rspec_rails and get error: config.gem: Unpacked gem CVS in vendor/gems has no specification file. Run ''rake gems:refresh_specs'' to fix this. config.gem: Unpacked gem CVS in vendor/gems not in a versioned directory. Giving up. config.gem: Unpacked gem rmagick-2.13.1 in vendor/gems has no specification file. Run ''rake gems:refresh_specs'' to fix this. rake aborted! no such file to load -- spec/translator please help me............ -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Jul-29 13:59 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
On Jul 29, 2010, at 6:37 AM, Amit Jain wrote:> David Chelimsky wrote: >> On Jul 29, 2010, at 5:19 AM, Amit Jain wrote: >>> Hello, >>> I recently unpacked the latest rspec and rspec rails in my >>> applicaiton. >> >> How did you unpack them (what command did you use)? > I just install rspec gem through the commands: > root# gem install rspec > root# gem install rcov > > and > > ~/mygreatapp/ $ ./script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/plugins/rspecrspec_on_rails is 2 years old and works with 2 year old versions of rails. Please do this: 1. delete all rspec plugins from vendor/plugins 2. configure the rspec-rails gem in config/environment.rb: config.gem "rspec-rails", :version => ">= 1.3.2" 3. rake gems:install 4. rake gems:unpack The problem you''re having with CVS in vendor/gems is that you installed it using some means other than what is recommended by Rails, which is to use "rake gems:unpack". Please remove that and any other gems that you didn''t install with "rake gems:unpack" from your vendor/gems directory, configure them config/environment.rb, and re-install them with "rake gems:unpack". If you continue to have trouble with this, please consult the ruby-on-rails documentation and/or mailing lists, as your issues are gem/plugin installation issues, not RSpec issues. HTH, David> > but it''s not work > > ~/mygreatapp/ $ ./script/generate rspec > and then > ./script/generate rspec_model User > >> >>> When I run my specs I get: >>> >>> $ rcov user_spec.rb >> >> Where are you typing this command? What happens when you type "rake >> spec" from the project root? >> I run that command in /spec/models directory > > /spec/models $ rcov user_spec.rb > >>> config.gem: Unpacked gem CVS in vendor/gems has no specification file. >> >> This error suggests that you unpacked the gem using "gem unpack" instead >> of "rake gems:unpack". >> >>> Run ''rake gems:refresh_specs'' to fix this. >>> config.gem: Unpacked gem CVS in vendor/gems not in a versioned >>> directory. Giving up. >> >> And this one suggests that you may have put a CVS plugin directly in the >> gems folder. Rails wants you to put plugins in vendor/plugins, and use >> "rake gems:unpack" to install gems in vendor/gems. >> >>> from >>> /home/Amit/Myworkspace/MyApplication/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:3 >> >> What version of rails are you using? rspec_on_rails was replaced by >> rspec-rails nearly two years ago, when rails was at 2.1.x. If you''re >> using any version of rails later than 2.1, you should be using the >> rspec-rails gem. > > I am using Rails 2.3.4. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Amit Jain
2010-Jul-30 07:03 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
David Chelimsky wrote:> On Jul 29, 2010, at 6:37 AM, Amit Jain wrote: > >> >> and >> >> ~/mygreatapp/ $ ./script/plugin install >> svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/plugins/rspec > > rspec_on_rails is 2 years old and works with 2 year old versions of > rails. Please do this: > > 1. delete all rspec plugins from vendor/plugins > 2. configure the rspec-rails gem in config/environment.rb: > > config.gem "rspec-rails", :version => ">= 1.3.2" > > 3. rake gems:install > 4. rake gems:unpack > > The problem you''re having with CVS in vendor/gems is that you installed > it using some means other than what is recommended by Rails, which is to > use "rake gems:unpack". Please remove that and any other gems that you > didn''t install with "rake gems:unpack" from your vendor/gems directory, > configure them config/environment.rb, and re-install them with "rake > gems:unpack". > > If you continue to have trouble with this, please consult the > ruby-on-rails documentation and/or mailing lists, as your issues are > gem/plugin installation issues, not RSpec issues. > > HTH, > DavidI am getting some different error message: $rcov user_spec.rb /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:440:in `load_missing_constant'': uninitialized constant Rails::Railtie (NameError) from /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' from /home/Amit/Myworkspace/MyApplication/vendor/gems/rspec-rails-2.0.0.beta.19/lib/rspec-rails.rb:3 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'' from /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:208:in `load'' from /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/initializer.rb:307:in `load_gems'' from /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/initializer.rb:307:in `each'' ... 11 levels... from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load'' from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 from /usr/bin/rcov:19:in `load'' from /usr/bin/rcov:19 Please help me. Thanks Amit Jain -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Jul-30 11:17 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
On Jul 30, 2010, at 2:03 AM, Amit Jain wrote:> David Chelimsky wrote: >> On Jul 29, 2010, at 6:37 AM, Amit Jain wrote: >> >>> >>> and >>> >>> ~/mygreatapp/ $ ./script/plugin install >>> svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/plugins/rspec >> >> rspec_on_rails is 2 years old and works with 2 year old versions of >> rails. Please do this: >> >> 1. delete all rspec plugins from vendor/plugins >> 2. configure the rspec-rails gem in config/environment.rb: >> >> config.gem "rspec-rails", :version => ">= 1.3.2" >> >> 3. rake gems:install >> 4. rake gems:unpack >> >> The problem you''re having with CVS in vendor/gems is that you installed >> it using some means other than what is recommended by Rails, which is to >> use "rake gems:unpack". Please remove that and any other gems that you >> didn''t install with "rake gems:unpack" from your vendor/gems directory, >> configure them config/environment.rb, and re-install them with "rake >> gems:unpack". >> >> If you continue to have trouble with this, please consult the >> ruby-on-rails documentation and/or mailing lists, as your issues are >> gem/plugin installation issues, not RSpec issues. >> >> HTH, >> David > > I am getting some different error message: > > $rcov user_spec.rb > > /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: > Gem::Dependency#version_requirements is deprecated and will be removed > on or after August 2010. Use #requirement > /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:440:in > `load_missing_constant'': uninitialized constant Rails::Railtie > (NameError) > from > /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in > `const_missing'' > from > /home/Amit/Myworkspace/MyApplication/vendor/gems/rspec-rails-2.0.0.beta.19/lib/rspec-rails.rb:3 > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from > /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in > `require'' > from > /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:208:in > `load'' > from > /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/initializer.rb:307:in > `load_gems'' > from > /home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/initializer.rb:307:in > `each'' > ... 11 levels... > from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load'' > from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 > from /usr/bin/rcov:19:in `load'' > from /usr/bin/rcov:19 > Please help me.Please show me what you typed in your config/environment.rb to configure rspec-rails.
Amit Jain
2010-Jul-30 11:52 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
David Chelimsky wrote:> On Jul 30, 2010, at 2:03 AM, Amit Jain wrote: > >>> rails. Please do this: >>> it using some means other than what is recommended by Rails, which is to >>> David >> (NameError) >> /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in >> ... 11 levels... >> from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load'' >> from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 >> from /usr/bin/rcov:19:in `load'' >> from /usr/bin/rcov:19 >> Please help me. > > Please show me what you typed in your config/environment.rb to > configure rspec-rails.Hi , I configure the rspec-rails gem in config/environment.rb: config.gem "rspec-rails", :version => ">= 1.3.2" Thanks Amit -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Jul-30 12:09 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
On Jul 30, 2010, at 6:52 AM, Amit Jain wrote:> David Chelimsky wrote: >> On Jul 30, 2010, at 2:03 AM, Amit Jain wrote: >> >>>> rails. Please do this: >>>> it using some means other than what is recommended by Rails, which is to >>>> David >>> (NameError) >>> /home/Amit/Myworkspace/MyApplication/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in >>> ... 11 levels... >>> from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511:in `load'' >>> from /usr/lib/ruby/gems/1.8/gems/rcov-0.9.8/bin/rcov:511 >>> from /usr/bin/rcov:19:in `load'' >>> from /usr/bin/rcov:19 >>> Please help me. >> >> Please show me what you typed in your config/environment.rb to >> configure rspec-rails. > > Hi , > > I configure the rspec-rails gem in config/environment.rb: > > 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.> Thanks > Amit > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Amit Jain
2010-Jul-30 12:47 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
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. [Amit at 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 [root at 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` [root at localhost MyApplication]# `gem list -d rspec-rails-1.3.2` [root at localhost MyApplication]# I don''t know about this error and why it is coming. -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2010-Jul-30 13:12 UTC
[rspec-users] how to fix ''rake gems:refresh_specs'' gems has no specificati
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. > > [Amit at 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 > > [root at 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` > [root at localhost MyApplication]# `gem list -d rspec-rails-1.3.2` > [root at localhost MyApplication]# > > I don''t know about this error and why it is coming.Try this: gem install rspec-rails --version "1.3.2"