Topic: Rspec and webrat issues

Hi everyone,

I'm learning RoR from http://railstutorial.org/, which I highly recommend. The author of the book have tried to help me through the issues, but he wasn't able to.

So now, I'll try to ask you.

In listing 3.1 (http://railstutorial.org/chapters/stati … file_rspec), we should install the rspec, rspec-rails and webrat gem. Now, I've been able to resolve the issues with webrat and rspec. But rspec-rails, I haven't been able to resolve.

source 'http://rubygems.org'

gem 'rails', '3.0.1'
gem 'mysql2'

group :development do
  gem 'rspec-rails', '2.0.1', :require 'rspec'
end

group :test do
  gem 'rspec', '2.0.1'
  gem 'webrat', '0.7.1'
end

This is the latest version of the Gemfile I've tried with. Can anybody please help me solve this problem?

--
lakridserne

Owner of WebPrePro

Re: Rspec and webrat issues

What seems to be the problem?

Only thing wrong with your Gemfile is that you're missing "=>" between :require and "rspec" but then again you don't even need that require there... Just copy Gemfile content from the book and replace only sqlite line with mysql2.

Re: Rspec and webrat issues

Thanks for your answer. That was what I did in the first try. It return an error message that it can't find the gem 'rspec-rails', '2.0.1'.

--
lakridserne

Owner of WebPrePro

Re: Rspec and webrat issues

Can you try this cmd: gem install rspec-rails -v=2.0.1 and see if that installs needed gem.

Re: Rspec and webrat issues

This command installed it, but it still return the same error message:

"Could not find gem 'rspec-rails (= 2.0.1, runtime)' in any of the gem sources."

--
lakridserne

Owner of WebPrePro

Re: Rspec and webrat issues

I remember having similar issue where I got 'Could not find gem '...' in any of the gem sources' but after retrying bundle command it worked as expected...

Sorry, but currently I have no more ideas.

Last edited by andain (2010-10-28 16:47:48)

Re: Rspec and webrat issues

I've tried to bundle it over and over again, but it doesn't help. Thanks for trying to help me. Anyone else who have ideas?

--
lakridserne

Owner of WebPrePro