Thursday, April 8, 2010

Mocha no longer can be loaded after installing will_paginate 3.0pre

Programmer Question

So I came about the strangest rails bug. I have been starting a new rails3 app, and just installed will_paginate 3.0pre. Unfortunately the rails 3.0.0.beta2 update made some of will_paginate 3.0pre code deprecated. I did a quick fix.



In gems/will_paginate-3.0.pre/lib/will_paginate/railtie.rb:



...
#railtie_name :will_paginate #Old code
config.will_paginate = ActiveSupport::OrderedOptions.new #New code
...


After doing this, I get the strangest problem. Mocha, a library that I had been using since the beginning of my project, suddenly didn't want to be found anymore. This seemed completely unrelated, but I haven't done anything else.



Loading development environment (Rails 3.0.0.beta2)
>> require 'mocha'
LoadError: no such file to load -- mocha
>> exit
~/Code/totem[master]% bundle show mocha
/Users/ekoslow/.rvm/gems/ruby-head/gems/mocha-0.9.8


Any thoughts?



Thank you.



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails