Content
You are here:
[Solved] assets not found when starting server
Added by Todd Klaus over 10 years ago
Hi,
I just finished a new install of OP3.0 on Arch Linux and everything seems to be working except that assets like the .css files are not found (see below), resulting in ‘plain’ web pages. I have not found any references to this problem on the forum or the web. Any thoughts on what is going on here?
Thanks,
Todd
openproject@crushinator openproject]$ RAILS_ENV=production bundle exec rails server require 'rails/all'... 0.170s Bundler.require... 0.500s => Booting WEBrick => Rails 3.2.17 application starting in production on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Application.initialize!... /home/openproject/.rvm/gems/ruby-2.1.1/gems/svg-graph-1.0.5/lib/SVG/Graph/Graph.rb:3: warning: class variable access from toplevel 1.750s [2014-03-14 15:19:57] INFO WEBrick 1.3.1 [2014-03-14 15:19:57] INFO ruby 2.1.1 (2014-02-24) [x86_64-linux] [2014-03-14 15:19:57] INFO WEBrick::HTTPServer#start: pid=10774 port=3000 Started GET "/" for 127.0.0.1 at 2014-03-14 15:20:03 -0700 Processing by WelcomeController#index as HTML Rendered welcome/index.html.erb within layouts/base (51.3ms) Rendered search/_mini_form.html.erb (1.2ms) Rendered account/_login.html.erb (7.4ms) Rendered layouts/_action_menu.html.erb (0.4ms) Completed 200 OK in 273.3ms (Views: 129.3ms | ActiveRecord: 64.4ms) Started GET "/assets/default-9eb64b587d2f55306eb69a3a0bcfba0f.css" for 127.0.0.1 at 2014-03-14 15:20:03 -0700 ActionController::RoutingError (No route matches [GET] "/assets/default-9eb64b587d2f55306eb69a3a0bcfba0f.css"): actionpack (3.2.17) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.17) lib/rails/rack/logger.rb:32:in `call_app' railties (3.2.17) lib/rails/rack/logger.rb:16:in `block in call' activesupport (3.2.17) lib/active_support/tagged_logging.rb:22:in `tagged' railties (3.2.17) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' rack (1.4.5) lib/rack/runtime.rb:17:in `call' activesupport (3.2.17) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.5) lib/rack/lock.rb:15:in `call' rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward' rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!' rack-cache (1.2) lib/rack/cache/context.rb:51:in `call' railties (3.2.17) lib/rails/engine.rb:484:in `call' railties (3.2.17) lib/rails/application.rb:231:in `call' railties (3.2.17) lib/rails/railtie/configurable.rb:30:in `method_missing' /home/openproject/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/frame_options.rb:31:in `call' /home/openproject/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/json_csrf.rb:18:in `call' rack (1.4.5) lib/rack/content_length.rb:14:in `call' railties (3.2.17) lib/rails/rack/log_tailer.rb:17:in `call' rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread' Started GET "/assets/application-c7d1015531af5a21ebabf30f8b316283.js" for 127.0.0.1 at 2014-03-14 15:20:03 -0700 ActionController::RoutingError (No route matches [GET] "/assets/application-c7d1015531af5a21ebabf30f8b316283.js"): actionpack (3.2.17) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.17) lib/rails/rack/logger.rb:32:in `call_app' railties (3.2.17) lib/rails/rack/logger.rb:16:in `block in call' activesupport (3.2.17) lib/active_support/tagged_logging.rb:22:in `tagged' railties (3.2.17) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' rack (1.4.5) lib/rack/runtime.rb:17:in `call' activesupport (3.2.17) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.5) lib/rack/lock.rb:15:in `call' rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward' rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!' rack-cache (1.2) lib/rack/cache/context.rb:51:in `call' railties (3.2.17) lib/rails/engine.rb:484:in `call' railties (3.2.17) lib/rails/application.rb:231:in `call' railties (3.2.17) lib/rails/railtie/configurable.rb:30:in `method_missing' /home/openproject/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/frame_options.rb:31:in `call' /home/openproject/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/json_csrf.rb:18:in `call' rack (1.4.5) lib/rack/content_length.rb:14:in `call' railties (3.2.17) lib/rails/rack/log_tailer.rb:17:in `call' rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread' Started GET "/assets/favicon-26fae539496f26698dbebce1ef471814.ico" for 127.0.0.1 at 2014-03-14 15:20:03 -0700 ActionController::RoutingError (No route matches [GET] "/assets/favicon-26fae539496f26698dbebce1ef471814.ico"): actionpack (3.2.17) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.17) lib/rails/rack/logger.rb:32:in `call_app' railties (3.2.17) lib/rails/rack/logger.rb:16:in `block in call' activesupport (3.2.17) lib/active_support/tagged_logging.rb:22:in `tagged' railties (3.2.17) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' rack (1.4.5) lib/rack/runtime.rb:17:in `call' activesupport (3.2.17) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.5) lib/rack/lock.rb:15:in `call' rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward' rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!' rack-cache (1.2) lib/rack/cache/context.rb:51:in `call' railties (3.2.17) lib/rails/engine.rb:484:in `call' railties (3.2.17) lib/rails/application.rb:231:in `call' railties (3.2.17) lib/rails/railtie/configurable.rb:30:in `method_missing' /home/openproject/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/frame_options.rb:31:in `call' /home/openproject/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/json_csrf.rb:18:in `call' rack (1.4.5) lib/rack/content_length.rb:14:in `call' railties (3.2.17) lib/rails/rack/log_tailer.rb:17:in `call' rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run' /home/openproject/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
Replies (3)
I did precompile the assets with:
bundle exec rake assets:precompile
and the files do exist in ~openproject/openproject/public/assets
-rw-r—r— 1 openproject openproject 175761 Mar 14 14:32 default-9eb64b587d2f55306eb69a3a0bcfba0f.css
-rw-r—r— 1 openproject openproject 637519 Mar 14 14:38 application-c7d1015531af5a21ebabf30f8b316283.js
-rw-r—r— 1 openproject openproject 4286 Mar 14 14:32 favicon-26fae539496f26698dbebce1ef471814.ico
setting:
config.serve_static_assets = true
in config/environments/production.rb
Hi!
Thank you Todd. I had the same problem and your solution fixed it!
Maïssa