MikeL
MikeL

Reputation: 208

Rails Passenger Error after replacing app

I'm very new to Rails and Passenger.

I was able to set up an application initially with Rails and Passenger (on a LAMP stack) as a sub URI

Now I deleted the app folder I was using and replaced it with a different one. But I think it is still expecting things from the old app. This is based on the first messages from my error_log file

    [ 2013-07-11 20:08:10.6046 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr] 
    [ 2013-07-11 20:08:10.6047 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr] ActionView::Template::Error (application.css isn't precompiled):
    [ 2013-07-11 20:08:10.6047 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     2: <html>
    [ 2013-07-11 20:08:10.6047 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     3: <head>
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     4:   <title><%= full_title(yield(:title)) %></title>
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     5:   <%= stylesheet_link_tag    "application", :media => "all" %>
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     6:   <%= javascript_include_tag "application" %>
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     7:   <%= csrf_meta_tags %>
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]     8:   <%= render 'layouts/shim' %>
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]   app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___2448934304053701042_30381400'
    [ 2013-07-11 20:08:10.6048 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr] 
    [ 2013-07-11 20:08:10.6049 639/7fe8bdeb5700 Pool2/Implementation.cpp:1174 ]: [App 663 stderr]

This works locally though.

Any thoughts?

Upvotes: 0

Views: 304

Answers (1)

Marek Lipka
Marek Lipka

Reputation: 51151

Try running:

bundle exec rake assets:precompile

in your production environment. The error occurs because in production environment assets should be precompiled in order to work. This is different than in development, where assets are served by rails app.

Upvotes: 1

Related Questions