Thursday, March 18, 2010

Missing gems even though they are present

Have you seen the following only to realize all those are already installed?

Missing these required gems:
rspec = 1.3.0
rspec-rails = 1.3.2

My environment.rb has entries for both of them like:

config.gem 'rspec', :version => '1.3.0'
config.gem 'rspec-rails', :version => '1.3.2'

After a lot of hair pulling I found we need to add another argument to that config.gem. The following fixed the problem:

config.gem 'rspec', :version => '1.3.0', :lib => false
config.gem 'rspec-rails', :version => '1.3.2', :lib => false

3 comments:

the morning of love said...

nice job! waiting for your new artical. ........................................

佩璇 said...

good~ keep sharing with us, please....I will waiting your up date everyday!! Have a nice day........................................

v辰原 said...

看到你的好文章真是開心 加油囉.......................................