railsmachine / moonshine

Simple Rails deployment and configuration management. 15 minute deploys of Rails 2, 3, or 4 apps.
http://railsmachine.github.com/moonshine/
GNU Lesser General Public License v3.0
666 stars 70 forks source link

Moonshine fails to compile passenger on ruby upgrade #125

Closed heymatthenry closed 11 years ago

heymatthenry commented 12 years ago

When upgrading ruby on a remote server via cap deploy:setup, the passenger apache module fails to compile. The error output looks like this:

* executing `passenger:compile'
* executing "gem list -i passenger && cd /usr/local/src/passenger && sudo /usr/bin/ruby -S rake clean apache2 || true"
    servers: ["qa.toura.com"]
    [qa.toura.com] executing command

[snip]

** [out :: qa.toura.com] g++ ext/common/Watchdog.cpp -o agents/PassengerWatchdog -Iext -Iext/common -D_REENTRANT -   I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic
** [out :: qa.toura.com] rake aborted!
** [out :: qa.toura.com] Don't know how to build task 'ext/libev/config.h'
** [out :: qa.toura.com]
** [out :: qa.toura.com] Tasks: TOP => apache2 => agents/PassengerLoggingAgent => libev => ext/libev/.libs/libev.a
** [out :: qa.toura.com] (See full trace by running task with --trace)

I'm able to successfully build the module by hand using sudo /usr/bin/passenger-install-apache2-module

technicalpickles commented 12 years ago

I've seen this come up a few times before, but haven't been able to track down what's causing it.

In general, I like to do a deploy after a ruby upgrade, and that has been enough to fix the problem.

bhollis commented 12 years ago

For the benefit of people looking for this in the future, the problem is that artifacts from a previous build are still around when you go to build Passenger. Running "rake clean" to clean out Passenger before building it again is required.

kplawver commented 11 years ago

This was fixed a while ago and never close. Building the apache module now runs rake clean first.