Shoulda, Bundler and Rails 3

67 views
Skip to first unread message

Joshua Partogi

unread,
Mar 7, 2010, 8:39:29 PM3/7/10
to sho...@googlegroups.com
Dear all,

I tried to do unit testing with the latest shoulda and Rails 3 and it
returned errors. I take a look at shoulda repository on github and I
found that there is a rails3 branch. Is this the branch that is tested
against Rails 3? How do I point and tell bundler to use this branch?
Has anybody used Should with bundler and Rails 3?

Kind regards,
Joshua

--
http://twitter.com/scrum8

Brian Maddy

unread,
Mar 9, 2010, 7:19:55 AM3/9/10
to sho...@googlegroups.com
Check out this ticket:
http://github.com/thoughtbot/shoulda/issues/issue/82/#issue/82

Szymek did lots of work getting most of it working and I fixed a few things too.  There's only one test not passing now (I haven't figured it out yet).  If you're interested on helping fix that last test, you can just clone it and do a bundle install and run the tests from there.  If you're just wanting to try it out it in a rails project, you can add something like this to your gemfile:

group :test do
  # for the main shoulda repo
  # gem "shoulda", :git => "git://github.com/thoughtbot/shoulda.git", :branch => "rails3"
  # the repo where only one test fails
  gem "shoulda", :git => "http://github.com/bmaddy/shoulda", :branch => "rails3"
end

Then do a bundle install

Cheers,
Brian


--
Individuals over processes. Interactions over tools.

Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:
http://thoughtbot.com/services/training

The Shoulda group:
http://groups.google.com/group/shoulda

To post to this group, send email to
sho...@googlegroups.com

To unsubscribe from this group, send email to
shoulda+u...@googlegroups.com

BillSaysThis

unread,
Apr 5, 2010, 7:49:18 PM4/5/10
to shoulda
I'm having trouble installing the version you posted, would appreciate
an assist. I get the following errors:

Gemfile excerpt:


gem "shoulda", :git => "http://github.com/bmaddy/shoulda", :branch =>
"rails3"

wgd1 root# bundle install
Fetching http://github.com/bmaddy/shoulda
fatal: http://github.com/bmaddy/shoulda/info/refs not found: did you
run git update-server-info on the server?
An error has occurred in git. Cannot complete bundling.

wgd1 root# gem install git://github.com/bmaddy/shoulda.git
ERROR: could not find gem git://github.com/bmaddy/shoulda.git locally
or in a repository

BillSaysThis

unread,
Apr 5, 2010, 7:44:10 PM4/5/10
to shoulda
I'm getting the following errors using bundle install or gem install,
would appreciate an assist. Note: Do I need to include the main
shoulda repo as well?

Gemfile excerpt:


gem "shoulda", :git => "http://github.com/bmaddy/shoulda", :branch =>
"rails3"

wgd1 root# bundle install

Brian Maddy

unread,
Apr 6, 2010, 10:49:11 AM4/6/10
to sho...@googlegroups.com
It looks like you're using http instead of the git protocol.  Try this:
gem "shoulda", :git => "git://github.com/bmaddy/shoulda", :branch => "rails3"

Cheers,
Brian


--
Individuals over processes. Interactions over tools.

Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:
http://thoughtbot.com/services/training

The Shoulda group:
http://groups.google.com/group/shoulda

To post to this group, send email to
sho...@googlegroups.com

To unsubscribe from this group, send email to
shoulda+u...@googlegroups.com

To unsubscribe, reply using "remove me" as the subject.

Bill Lazar

unread,
Apr 6, 2010, 12:00:47 PM4/6/10
to sho...@googlegroups.com
That helped but still get this:

wgd1 root# bundle check
The Gemfile's dependencies are satisfied

wgd1 xxxx$ rails s
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-0.9.16/lib/bundler/source.rb:311:in `rescue in load_spec_files': git://github.com/bmaddy/shoulda (at rails3) is not checked out. Please run `bundle install` (Bundler::PathError)

Updated Gemfile line is:
gem "shoulda", :git => "git://github.com/bmaddy/shoulda", :branch => "rails3"

Thanks,
Bill

ps - I used http:// because I copied from your previous response in this thread.

Wes

unread,
May 22, 2010, 1:09:37 PM5/22/10
to shoulda
The problem is you need ".git" at the end of the URL, whether you're
using http or git. Like this:

http://github.com/bmaddy/shoulda.git

Wes

On Apr 6, 12:00 pm, Bill Lazar <bstgro...@gmail.com> wrote:
> That helped but still get this:
>
> wgd1 root# bundle check
> The Gemfile's dependencies are satisfied
>
> wgd1 xxxx$ rails s
> /usr/local/lib/ruby/gems/1.9.1/gems/bundler-0.9.16/lib/bundler/
> source.rb:311:in `rescue in load_spec_files': git://github.com/bmaddy/
> shoulda (at rails3) is not checked out. Please run `bundle install`  
> (Bundler::PathError)
>
> Updated Gemfile line is:
>         gem "shoulda", :git => "git://github.com/bmaddy/shoulda", :branch =>  
> "rails3"
>
> Thanks,
> Bill
>
> ps - I used http:// because I copied from your previous response in  
> this thread.
>
> On Apr 6, 2010, at 7:49 AM, Brian Maddy wrote:
>
>
>
> > It looks like you're using http instead of the git protocol.  Try  
> > this:
> > gem "shoulda", :git => "git://github.com/bmaddy/shoulda", :branch =>  
> > "rails3"
>
> > Cheers,
> > Brian
>

> > On Mon, Apr 5, 2010 at 6:44 PM, BillSaysThis <bstgro...@gmail.com>  


> > wrote:
> > I'm getting the following errors using bundle install or gem install,
> > would appreciate an assist. Note: Do I need to include the main
> > shoulda repo as well?
>
> > Gemfile excerpt:
> > gem "shoulda", :git => "http://github.com/bmaddy/shoulda", :branch =>
> > "rails3"
>
> > wgd1 root# bundle install
> > Fetchinghttp://github.com/bmaddy/shoulda

> > fatal:http://github.com/bmaddy/shoulda/info/refsnot found: did you

Reply all
Reply to author
Forward
0 new messages