Problem seeing and accessing RSpec gems

Hello RSpec-list:

I’m having trouble getting rspec and rspec-rails correctly installed on
my
system. (I had to uninstall, unfortunately).The upshot is that even when
they are installed – i.e. when I can see them on my system – they
don’t
appear known to gem which which and, more importantly, they are not
accessible to my application. I’ve tried options such as installing
with
–no-rdoc, cleaning out all files manually from ~/.gem (and cache, doc,
etc), installing via rake gems:install from w/in the app and installing
versus gem install and sudo gem install outside the app…

Are there any steps that, if done wrong once, could have permanently
hosed
the system? For instance, if at some point I answered “Y”, which I
believe
that I did to
Remove executables:
autospec, spec

Would that cause this type of issue? If so, is there any way I can
reset? A
clean uninstall doesn’t do it.

I’ve put a fairly detailed log of what I’ve been doing and system
responses
if it’s helpful. It seems like it boils down to the first issue: that
even
though the gems show up via gem list, gem which doesn’t turn them up.
The
rest just confirms this. Any thoughts helpful. Thanks.


Are they there?

$ gem list rspec

*** LOCAL GEMS ***

rspec (1.2.2)
rspec-rails (1.2.2)

OK, where are they?

$ gem which rspec
Can’t find ruby library file or shared library rspec

$ gem which rspec-rails
Can’t find ruby library file or shared library rspec-rails

Let’s do this manually

$cd /usr/local/lib/ruby/gems/1.8/gems
$ls | grep rspec
rspec-1.2.2
rspec-rails-1.2.2

Let’s try to unpack them, then

$ sudo rake vendor gems:unpack RAILS_ENV=test
(in /Users/sarah/Sites/site-name)
no such file to load – rspec
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' .... massive stack trace here /usr/local/bin/rake:19:inload’
/usr/local/bin/rake:19
These gems that this application depends on are missing:

  • rspec
  • rspec-rails
    Run “rake gems:install” to install them.
    no such file to load – rspec

Doesn’t sound promising, but OK, I’ll try again

$ rake gems:install RAILS_ENV=test
(in /Users/sarah/Sites/site-name)
no such file to load – rspec
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require’
… massive stack trace here; same as above
However, at the end of the stack track, it installs the gems anyway, to
~/.gem
gem install rspec --version “>= 1.2.0”
WARNING: Installing to ~/.gem since /usr/local/lib/ruby/gems/1.8 and
/usr/local/bin aren’t both writable.
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc


Thank you for installing rspec-1.2.2

Please be sure to read History.rdoc and Upgrade.rdoc
for useful information about this release.


Successfully installed rspec-1.2.2
1 gem installed
Installing ri documentation for rspec-1.2.2…
Installing RDoc documentation for rspec-1.2.2…
gem install rspec-rails --version “>= 1.2.0”
WARNING: Installing to ~/.gem since /usr/local/lib/ruby/gems/1.8 and
/usr/local/bin aren’t both writable.
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc


Thank you for installing rspec-rails-1.2.2

If you are upgrading, do this in each of your rails apps
that you want to upgrade:

$ ruby script/generate rspec

Please be sure to read History.rdoc and Upgrade.rdoc
for useful information about this release.


Successfully installed rspec-rails-1.2.2
1 gem installed
Installing ri documentation for rspec-rails-1.2.2…
Installing RDoc documentation for rspec-rails-1.2.2…

Just for fun, try to unpack, again:

$ sudo rake gems:unpack RAILS_ENV=test
Password:
(in /Users/sarah/Sites/radio-info)
no such file to load – rspec
… stack trace

OK, I will uninstall and try again

$ sudo gem uninstall rspec
Remove executables:
autospec, spec

in addition to the gem? [Yn] n
Executables and scripts will remain installed.

You have requested to uninstall the gem:
rspec-1.2.2
rspec-rails-1.2.2 depends on [rspec (= 1.2.2)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled rspec-1.2.2
sarah-grays-computer:radio-info sarah$ sudo gem uninstall rspec-rails
Successfully uninstalled rspec-rails-1.2.2

Still there?

$ gem list rspec

*** LOCAL GEMS ***

rspec (1.2.2)
rspec-rails (1.2.2)

$ gem uninstall rspec
ERROR: While executing gem … (Gem::InstallError)
Unknown gem rspec >= 0

#OK, now I will manually remove the gem from
$cd /Users/sarah/.gem/ruby/1.8/gems; $sudo rm -rf rspec*
$cd /Users/sarah/.gem/ruby/1.8/cache; $sudo rm -rf rspec*
$cd /Users/sarah/.gem/ruby/1.8/doc; $sudo rm -rf rspec*
$cd /Users/sarah/.gem/ruby/1.8/specifications; $sudo rm -rf rspec*

Check gone.

$ gem list rspec

*** LOCAL GEMS ***

OK, confirmed gone, start from scratch

$ sudo gem install rspec


Thank you for installing rspec-1.2.2

Please be sure to read History.rdoc and Upgrade.rdoc
for useful information about this release.


Successfully installed rspec-1.2.2
1 gem installed
Installing ri documentation for rspec-1.2.2…
Installing RDoc documentation for rspec-1.2.2…
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
sarah-grays-computer:~ sarah$ gem which rspec
Can’t find ruby library file or shared library rspec
sarah-grays-computer:~ sarah$ gem list rspec

*** LOCAL GEMS ***

rspec (1.2.2)

See if the gem is accessible from w/in the application:

$ ruby script/generate rspec
:0:Warning: Gem::SourceIndex#search support for Regexp patterns is
deprecated
Couldn’t find ‘rspec’ generator
sarah-grays-computer:site-name sarah$


Any thoughts?

Thanks,
Sarah

On Mon, Apr 13, 2009 at 2:22 PM, Sarah G. [email protected]
wrote:

the system? For instance, if at some point I answered “Y”, which I believe


Can’t find ruby library file or shared library rspec-rails
`gem_original_require’
no such file to load – rspec
WARNING: Installing to ~/.gem since /usr/local/lib/ruby/gems/1.8 and
Successfully installed rspec-1.2.2


Installing RDoc documentation for rspec-rails-1.2.2…
in addition to the gem? [Yn] n
$ gem list rspec
$cd /Users/sarah/.gem/ruby/1.8/specifications; $sudo rm -rf rspec*
Successfully installed rspec-1.2.2
*** LOCAL GEMS ***
Any thoughts?
I’m not familiar with a gemwhich - sounds crunchy - but …

$ gem which spec
(checking gem rspec-1.2.3 for spec)
/Library/Ruby/Gems/1.8/gems/rspec-1.2.3/lib/spec.rb
$ gem which spec/rails
(checking gem rspec-rails-1.2.3 for spec/rails)
/Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.3/lib/spec/rails.rb

Of course, 1.2.3 isn’t released yet, but I have special privileges :wink:

So it appears that “gem which” looks for files, not gems or executables.

HTH,
David

David, thanks, that does appear to be true, which is helpful to know,
thanks. But the “gem which” problem was really the canary in the coal
mine
for the fact that the gems aren’t being recognized when I am attempting
to
configure them:
$ gem which spec
(checking gem rspec-1.2.2 for spec)
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib/spec.rb

$ gem which spec/rails
(checking gem rspec-rails-1.2.2 for spec/rails)
/usr/local/lib/ruby/gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails.rb

This is what I have in environment/test.rb
config.gem “rspec”, :lib => false, :version => “>= 1.2.0”
config.gem “rspec-rails”, :lib => false, :version => “>= 1.2.0”

but when I check the configuration by running
$ rake gems RAILS_ENV=test

I get this massive stack trace that ends in this:
These gems that this application depends on are missing:

  • rspec
  • rspec-rails
    Run “rake gems:install” to install them.
    no such file to load – rspec

I’m missing something here and it’s not obvious to me… I’m hoping it
is
obvious to s/o else… thanks.
This then ends up in me not being able to successful run ruby
script/generate rspec

Stack trace below:

(in /Users/sarah/Sites/site-name)
no such file to load – rspec
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /Users/sarah/Sites/site-name/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:57:inload’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in
__send__' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:into_proc’
/Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:in
each' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:inload_gems’
/Users/sarah/Sites/site-name/config/…/vendor/rails/railties/lib/initializer.rb:142:in
process' /Users/sarah/Sites/site-name/config/../vendor/rails/railties/lib/initializer.rb:93:insend’
/Users/sarah/Sites/site-name/config/…/vendor/rails/railties/lib/initializer.rb:93:in
run' /Users/sarah/Sites/site-name/config/environment.rb:13 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/Users/sarah/Sites/site-name/lib/tasks/maintenance.rake:1
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:in
load' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:inload’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:inload’
/Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/rails.rb:7
/Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/rails.rb:7:in
each' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/rails.rb:7 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' /Users/sarah/Sites/site-name/Rakefile:9 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:inload’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in
raw_load_rakefile' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1993:inload_rakefile’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1992:inload_rakefile’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1976:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:instandard_exception_handling’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/local/bin/rake:19:inload’
/usr/local/bin/rake:19
no such file to load – rspec-rails
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /Users/sarah/Sites/site-name/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:57:inload’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in
__send__' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:into_proc’
/Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:in
each' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:inload_gems’
/Users/sarah/Sites/site-name/config/…/vendor/rails/railties/lib/initializer.rb:142:in
process' /Users/sarah/Sites/site-name/config/../vendor/rails/railties/lib/initializer.rb:93:insend’
/Users/sarah/Sites/site-name/config/…/vendor/rails/railties/lib/initializer.rb:93:in
run' /Users/sarah/Sites/site-name/config/environment.rb:13 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/Users/sarah/Sites/site-name/lib/tasks/maintenance.rake:1
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:in
load' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:inload’
/Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:502:inload’
/Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/rails.rb:7
/Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/rails.rb:7:in
each' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/rails.rb:7 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' /Users/sarah/Sites/site-name/Rakefile:9 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:inload’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in
raw_load_rakefile' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1993:inload_rakefile’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1992:inload_rakefile’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1976:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:instandard_exception_handling’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/local/bin/rake:19:inload’
/usr/local/bin/rake:19
These gems that this application depends on are missing:

  • rspec
  • rspec-rails
    Run “rake gems:install” to install them.
    no such file to load – rspec
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
    require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
    require' /Users/sarah/Sites/site-name/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:57:inload’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in
    __send__' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:into_proc’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:in
    each' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:inload_gems’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:142:in
    process' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:93:insend’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:93:in
    run' /Users/sarah/Sites/site-name/config/environment.rb:13 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
    new_constants_in' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/misc.rake:3
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
    invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:238:insynchronize’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
    invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:ininvoke’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/gems.rake:15
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
    invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:238:insynchronize’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
    invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:ininvoke_prerequisites’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:ininvoke_prerequisites’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in
    invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:238:insynchronize’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
    invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:ininvoke’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in
    invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:intop_level’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:intop_level’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
    standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:intop_level’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:instandard_exception_handling’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/local/bin/rake:19:inload’
    /usr/local/bin/rake:19
    no such file to load – rspec-rails
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
    require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
    require' /Users/sarah/Sites/site-name/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:57:inload’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in
    __send__' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:into_proc’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:in
    each' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:246:inload_gems’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:142:in
    process' /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:93:insend’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/initializer.rb:93:in
    run' /Users/sarah/Sites/site-name/config/environment.rb:13 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    require' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
    /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
    new_constants_in' /Users/sarah/Sites/site-name/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/misc.rake:3
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
    invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:238:insynchronize’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
    invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:ininvoke’
    /Users/sarah/Sites/site-name/vendor/rails/railties/lib/tasks/gems.rake:15
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:inexecute’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
    invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:238:insynchronize’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
    invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:ininvoke_prerequisites’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:ininvoke_prerequisites’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in
    invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:238:insynchronize’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
    invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:ininvoke’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in
    invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:intop_level’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:intop_level’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
    standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:intop_level’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:instandard_exception_handling’
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/local/bin/rake:19:inload’
    /usr/local/bin/rake:19

[F] thoughtbot-factory_girl
[ ] rspec >= 1.2.0
[ ] rspec-rails >= 1.2.0

I = Installed
F = Frozen

These gems that this application depends on are missing:

  • rspec
  • rspec-rails

rails -v2.3.2
(Sorry about that long stack trace in the last message!)

On Mon, Apr 13, 2009 at 3:36 PM, Sarah G. [email protected]
wrote:

This is what I have in environment/test.rb
config.gem “rspec”, :lib => false, :version => “>= 1.2.0”
config.gem “rspec-rails”, :lib => false, :version => “>= 1.2.0”
but when I check the configuration by running
$ rake gems RAILS_ENV=test

I get this (with rspec + rspec-rails + factory girl configured in
test.rb):

$ rake gems RAILS_ENV=test
(in /Users/david/projects/ruby/tmp/foo)

  • [I] rspec >= 1.2.0
  • [ ] rspec-rails >= 1.2.0
  • [I] thoughtbot-factory_girl

I = Installed
F = Frozen
R = Framework (loaded before rails starts)

What version of rails are you using?

On Mon, Apr 13, 2009 at 4:34 PM, Sarah G. [email protected]
wrote:

rails -v
2.3.2

Me too. Not sure what to tell you.

Anybody else?

When uninstalling rspec, should you:

Remove executables:
autospec, spec
in addition to the gem? [Yn]

And, is there possible fallout from doing this step wrong?

On Mon, Apr 13, 2009 at 5:04 PM, Sarah G. [email protected]
wrote:

When uninstalling rspec, should you:
Remove executables:
autospec, spec
in addition to the gem? [Yn]
And, is there possible fallout from doing this step wrong?

As long as you’re going to reinstall it, then there should not be any
fallout.

I’m sure you have tried this, but it’s such a simple step that I’ll
throw it
out.

I’ve had a couple instances in the past where gems were not being loaded
and
after troubleshooting for a while, I found that all problems were
magically
solved by firing up a new instance of my shell (new terminal window).
Somehow the environment had gotten confused…

Worth a shot.

Jeff

On Mon, Apr 13, 2009 at 4:46 PM, Sarah G. [email protected]
wrote:

Jeff, always a good idea – it didn’t work in this case, but I’ve seen it
before. I ended up uninstalling my rails gem (and the action* gems) and
reinstalling; then, reinstalling rspec and rspec-rails. After that, rspec
worked without the issues I’d seen before. Don’t know why.

I didn’t read this in time, but my first thought was going to be to
suggest a “gem env” to find out your gem loading paths. You never
mentioned what OS you’re using, but from the use of /Users for your
homedir and /usr/local/lib/ruby for the gempath, I’m guessing it’s a
Mac where you recompiled Ruby yourself. It’s great the Leopard came
with 1.8.6, but the gem environment is a pretty big mess, and adding
your own stuff on top of it (even as innocuously as with a “sudo gem
update --system”) can sometimes leave a strange path state.

That’s just a fly-by observation based on ways I’ve set myself on fire
in the past. If you got it working, you got it working, so it may not
matter until next time. >8->


Have Fun,
Steve E. ([email protected])
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org

Jeff, always a good idea – it didn’t work in this case, but I’ve seen
it
before. I ended up uninstalling my rails gem (and the action* gems) and
reinstalling; then, reinstalling rspec and rspec-rails. After that,
rspec
worked without the issues I’d seen before. Don’t know why.
Thanks.