开发者

Gem using wrong activesupport version (3.0.3) and should use 2.3.9 when deployed to Heroku

I have a rails 2.3.9 app that uses a gem and works perfectly fine when I run it locally. But when I try to push my app to heroku it breaks saying that the gem activated activesupport 3.0.3, and that my heroku app can't run activesupport 2.3.9 because 3.0.3 is already activated... I've uninstalled activesupport 3.0.3 locally, and re-installed the gem locally but still doesn't work in heroku.

  1. Was activesupport3.0.3 really uninstalled (sudo gem uninstall activesupport -v 3.0.3)?
  2. Why does the gem work in my local environment and not heroku?
  3. When pushing to heroku (git push heroku master) and it reads the .gem file, w开发者_运维问答hy is it that when it starts installing the gem, it still continues to install activesupport 3.0.3 on heroku??

my heroku logs:

==> dyno-3352306.log (crash) <== /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate activesupport (= 2.3.9, runtime) for ["rails-2.3.9"], already activated activesupport-3.0.3 for ["THISGEM-1.2.3"] (Gem::LoadError)

can someone give me some guidance?? Your help is mucho appreciated!

.gems

rails --version 2.3.9
will_pagnate --version x.x.x
THISGEMTHATDEPENDSONACTIVESUPPORT&HPRICOT--version 1.2.3 --ignore-dependencies
hpricot --version x.x.x


after trying the gemfile bundler method, and having will_pagnate break on me both locally and on deployment, I had a look at .gems manifest one more time. and this time it worked!! I don't know what I changed but I think the order in which you list your gems matter.. the "THISGEMTHATDEPENDSONACTIVESUPPORT&HPRICOT" needs to go AFTER hpricot. so that when heroku reads the gems file, it installs the dependencies BEFORE installing the "THISGEMTHATDEPENDSONACTIVESUPPORT&HPRICOT". my final .gems file looked like this, and it worked! can someone confirm that this is the case? Amazing, I was stuck on this for 2 days, only to find out its the order you list your gems.

rails --version 2.3.9
will_pagnate --version x.x.x
hpricot --version x.x.x
THISGEMTHATDEPENDSONACTIVESUPPORT&HPRICOT--version 1.2.3 --ignore-dependencies
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜