Unable to deploy to Apache

On Apr 13, 2012, at 10:36 AM, Raels Koder wrote:

I get the same error. I am also using passenger, although I don’t
always use it. I am also using RVM.

I noticed an error that popped up in my email from rake (I am working on
a Mac) that showed an error from rake 1.8.X something or other, instead
of the rake from 1.9.2 that I am running. I suspect that deep in some
of the code, someone is diddling the path incorrectly. I don’t have
time right now to chase it down, but I thought that this might at least
help.

That’s an excellent point. Look in your Apache configuration and make
sure that the path to Ruby in your Passenger configuration block
includes your rvm prefix, and to the Ruby you think you’re using. You
may not be running the same Ruby for Passenger as your application, and
that’s guaranteed to be awful.

Walter

Hi Walter,

They look correct… (from httpd.conf)

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/
passenger-3.0.11/ext/apache2/mod_passenger.so

PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11
PassengerRuby /usr/local/bin/ruby


Again, I’m running…

Ruby 1.9.3p0 (which ruby = /usr/local/bin/ruby)
Rails 3.1.3
Phusion Passenger version 3.0.11

Thanks,

~Kal

Thanks for the suggestion Raels :slight_smile:

Although, this doesn’t seem to be the culprit :frowning:

~Kal

On Apr 19, 2012, at 2:32 AM, Kal wrote:

below).

Thanks again for all you help. It was very much appreciated.

I am glad you got there in the end. Definitely not the usual
out-of-the-box experience.

Walter

Hi Walter,

So, I finally got everything working here (with database and all).

  1. I definitely had to create a new user ‘app_user’, add it to the
    sudoer file, and apply ‘chown - R app_user /home/rubys/work/depot’.

  2. I wasn’t able to issue “RAILS_ENV=production bundle exec rake
    assets:precompile”. Got the “rake aborted! stack level too deep”
    error.

– I was able to overcome this by disabling the ‘config.assets.digest’
feature within config/environments/production.rb (see below) and re-
running the rake command.

  1. I still wasn’t able to view my web app. The
    “ActionView::Template::Error (application.css isn’t precompiled):”
    appeared in the production.log file.

– I was able to view the web app after enabling
‘config.assets.compile’ within config/environments/production.rb (see
below).

Thanks again for all you help. It was very much appreciated.

Cheers,

~Kal


config/environments/production.rb

Don’t fallback to assets pipeline if a precompiled asset is missed

config.assets.compile = true

Generate digests for assets URLs

config.assets.digest = false


LOL, definitely not :-]