1

I am currently running Redmine, and while updating the gems, Phusion Passenger is throwing errors that it is unable to locate the required libraries. It seems that it keeps looking for the older gems, and not the newer ones.

After updating the gems, I run the command:

gem cleanup

to remove all older gems that should not be needed anymore.

Unfortunately, despite the fact that newer gems are installed, Phusion Passenger is throwing the following error:

Could not find activesupport-3.2.11 in any of the sources (Bundler::GemNotFound)

activesupport-3.2.12 has been installed, however.

To temporarily resolve the issue, I needed to install the older version back. Unfortunately, I needed to install all of the older versions of the dependencies... Is there a way to get Phusion Passenger to see the newer versions of the required gems? I don't really know much about Ruby, Rails, or gems, so I appreciate any assistance I get on this issue.

Thank You

EDIT: Per request, here is the output for gem dependency activesupport -reverse-dependencies:

Gem activesupport-3.2.12
  i18n (~> 0.6)
  multi_json (~> 1.0)
  Used by
    actionpack-3.2.12 (activesupport (= 3.2.12))
    activemodel-3.2.12 (activesupport (= 3.2.12))
    activerecord-3.2.12 (activesupport (= 3.2.12))
    activeresource-3.2.12 (activesupport (= 3.2.12))
    rails-3.2.12 (activesupport (= 3.2.12))
    railties-3.2.12 (activesupport (= 3.2.12))
    treetop-1.4.12 (activesupport (>= 0, development))

EDIT: I think I found the source of my problems: The Gemfile and the Gemfile.lock that is in the Redmine directory. In the Gemfile.lock file, it lists the following:

specs:
    actionmailer (3.2.11)
    actionpack (= 3.2.11)
    mail (~> 2.4.4)
    actionpack (3.2.11)
    activemodel (= 3.2.11)
    activesupport (= 3.2.11)
    builder (~> 3.0.0)
    erubis (~> 2.7.0)
    journey (~> 1.0.4)
    rack (~> 1.4.0)
    rack-cache (~> 1.2)
    rack-test (~> 0.6.1
    ...

So, this is likely the file that is causing all the issues... Now, how to fix this?

Phanto
  • 1,147
  • 5
  • 16
  • 19
  • how did you update the gems? Did you edit the Gemfile and run bundle update? – Doon Mar 18 '13 at 12:52
  • I've never actually attempted to update this before. I'm trying to update rails to install the latest security patches. It downloaded some newer versions of other gems. So, I ran the clean. However, I am in the process of reinstalling passenger, but the same problem is persisting. – Phanto Mar 18 '13 at 12:54
  • Could you run `gem dependency activesupport --reverse-dependencies` and update the question with the output? essentially that tells you which gems (with the versions) are depending on active support. – fmendez Mar 18 '13 at 12:58
  • @fmendez: I updated the post with the output. – Phanto Mar 18 '13 at 13:03
  • @Phanto edit the question and please add it there, not in the comments section. – fmendez Mar 18 '13 at 13:04
  • if you are not adjusting Redmine's gemfile and just trying to upgrade the gems outside of bundler, you will get these errors. You best bet is to update the Rails version in Gemfile, and then run bundle in that directory. The gemfile will dictate which gems the rails instance uses/loads – Doon Mar 18 '13 at 13:05
  • @Phanto sorry I updated the command, please run that one instead. – fmendez Mar 18 '13 at 13:05
  • some googling suggests you should upgrade to redmine 2.2.3 which upgrades to rails 3.2.12, (But the reason passenger cannot find the gems/using old ones is that they are being managed by bundler and you are not updating the Gemfile to tell it to use the new ones) – Doon Mar 18 '13 at 13:12
  • Try running `bundle install`. As mentioned by @Doon you should be updating your gems in the `Gemfile`. When deploying the application the `Gemfile.lock` (produced by the `bundle install` cmd) is the one which "dictates" when gems and version of them are being used. – fmendez Mar 18 '13 at 13:14
  • Which directory do I run `bundle install` in? – Phanto Mar 18 '13 at 13:20
  • I am having a SERIOUS issue here. I ran a bundle install in one of the passenger directories, and it installed a bunch of older gems. None of them are working, and now, for some reason, it seems that my entire ruby gems situation totally screwed. It appears to be depending on older versions of everything now... How do I update the gems to use newer versions? I don't understand why this is so difficult... – Phanto Mar 18 '13 at 13:49
  • Right now, I'm in the process of installing all of the older versions that worked... Can someone tell me how you are properly supposed to update the dependencies, since there is virtually no documentation on this? – Phanto Mar 18 '13 at 13:58
  • Luckily, I was able to get Redmine working again. Unfortunately, I came full-circle, and the patches are not installed. So... How do I update rails and all other dependencies without breaking anything? – Phanto Mar 18 '13 at 14:12
  • @fmendez, please see the edits in the post. I think I may have found the source of all the frustration. – Phanto Mar 18 '13 at 14:24
  • @Phanto did you updated you `Gemfile` before doing the bundle install? – fmendez Mar 18 '13 at 14:27
  • I was confused as to where the Gemfile was located, and were `bundle install` should be performed (again, I'm a total n00b to ruby and gems). I ran it in the passenger directory, which was the wrong place to run it. I *think* I'm supposed to run bundle install in the Redmine directory? – Phanto Mar 18 '13 at 14:29
  • @Phanto You have to do this. Open the Redmin `Gemfile` (should be located at root of the redmine project). In that file, you'll update the desire gems. In the terminal, go to the root of the `Redmine` project (same level where the `Gemfile` is located) and there do a 'bundle install'. That will update your gems and Replace your `Gemfile.lock` with a new one listing the new gems. – fmendez Mar 18 '13 at 14:33
  • Ok. that makes sense. I will try that. If it works, please submit that as an answer, and I will mark it. – Phanto Mar 18 '13 at 14:37
  • @fmendez You are awesome! That fixed my problem. Can you write that as an answer? – Phanto Mar 18 '13 at 14:57
  • @Phanto Glad that worked. Just it as an answer. Cheers! – fmendez Mar 18 '13 at 15:00

1 Answers1

1

You'll have to do the following:

Open the Redmine Gemfile (should be located at root of the redmine project). In that file, you'll update the desire gems. In the terminal, go to the root of the Redmine project (same level where the Gemfile is located) and there do a bundle install. That will update your gems and Replace your Gemfile.lock with a new one listing the new gems.

fmendez
  • 7,250
  • 5
  • 36
  • 35
  • 1
    We're looking at making StackOverflow the primary support forum for Phusion Passenger. Could you help us by upvoting the "phusion" synonym at http://stackoverflow.com/tags/passenger/synonyms? – Hongli May 05 '13 at 23:00
  • Absolutely, I just did. Cheers! – fmendez May 06 '13 at 12:45