Content
500 Internal server error / css isn't precompiled
The meeting and the global roles don’t work because theirs .css aren’t “precompiled”.
Started GET "/users/3/edit" for 192.168.4.94 at 2014-07-22 00:15:48 +0200
Processing by UsersController#edit as HTML
Parameters: {"id"=>"3"}
Rendered layouts/_action_menu_base.html.erb (0.1ms)
Rendered layouts/_action_menu_specific.html.erb (0.4ms)
Rendered users/_impaired_settings.html.erb (2.4ms)
Rendered users/_mail_notifications.html.erb (7.9ms)
Rendered users/_preferences.html.erb (6.9ms)
Rendered users/_form.html.erb (33.0ms)
Rendered users/_general.html.erb (37.2ms)
Rendered users/_memberships.html.erb (13.4ms)
Rendered /usr/local/lib/ruby/gems/2.1/bundler/gems/openproject-global_roles-2afc52cdc755/app/views/shared/_global_roles_header.html.erb (26.2ms)
Rendered /usr/local/lib/ruby/gems/2.1/bundler/gems/openproject-global_roles-2afc52cdc755/app/views/users/_global_roles.html.erb (26.5ms)
Rendered common/_tabs.html.erb (79.6ms)
Rendered users/edit.html.erb within layouts/admin (93.3ms)
Completed 500 Internal Server Error in 105.4ms
ActionView::Template::Error (global_roles/global_roles.css isn't precompiled):
19: ++#%>
20:
21: <% content_for :header_tags do %>
22: <%= stylesheet_link_tag 'global_roles/global_roles.css' %>
23: <%= javascript_include_tag 'global_roles/global_roles.js' %>
24: <% end %>
app/views/common/_tabs.html.erb:61:in `block in _app_views_common__tabs_html_erb__1018024196552026748_17319501080'
app/views/common/_tabs.html.erb:60:in `each'
app/views/common/_tabs.html.erb:60:in `_app_views_common__tabs_html_erb__1018024196552026748_17319501080'
app/helpers/application_helper.rb:327:in `render_tabs'
app/views/users/edit.html.erb:43:in `_app_views_users_edit_html_erb__561233729422719047_17372316600'
############################################################
Processing by MeetingsController#index as HTML
Parameters: {"project_id"=>"test"}
Rendered /usr/local/lib/ruby/gems/2.1/bundler/gems/openproject-meeting-fed782344428/app/views/shared/_meeting_header.html.erb (32.8ms)
Rendered /usr/local/lib/ruby/gems/2.1/bundler/gems/openproject-meeting-fed782344428/app/views/meetings/index.html.erb within layouts/base (60.3ms)
Completed 500 Internal Server Error in 226.5ms
ActionView::Template::Error (meeting/meeting.css isn't precompiled):
20: ++#%>
21:
22: <% content_for :header_tags do %>
23: <%= stylesheet_link_tag 'meeting/meeting.css' %>
24: <% end %>
Hello Nicola,
if you add or update a plugin you should always run the database migrations and you have to precompile the assets again.
RAILS_ENV=production bundle exec rake db:migrate RAILS_ENV=production bundle exec rake assets:precompile
Than restart the server (Apache or nginx) and everything should work.
Best
Ratzi
Hi
Thanks a lot for the answer.
The precompile process is aborted bcause “jquery.ui.all” isn’t found :-(
How can I install this?
RAILS_ENV=production bundle exec rake assets:precompile --trace require 'rails/all'... 0.953s Bundler.require... 2.078s ** Invoke assets:precompile (first_time) ** Execute assets:precompile /usr/local/bin/ruby21 /usr/local/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace require 'rails/all'... 0.938s Bundler.require... 2.125s ** Invoke assets:precompile:all (first_time) ** Execute assets:precompile:all ** Invoke assets:precompile:primary (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment Application.initialize!... [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. 3.680s ** Invoke tmp:cache:clear (first_time) ** Execute tmp:cache:clear ** Execute assets:precompile:primary rake aborted! Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' (in /usr/local/openproject/app/assets/javascripts/application.js.erb:14) /usr/local/lib/ruby/gems/2.1/gems/sprockets-2.12.1/lib/sprockets/context.rb:106:in `resolve' /usr/local/lib/ruby/gems/2.1/gems/sprockets-2.12.1/lib/sprockets/context.rb:146:in `require_asset' ... /usr/local/lib/ruby/gems/2.1/gems/rake-10.3.2/lib/rake/application.rb:75:in `run' /usr/local/lib/ruby/gems/2.1/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' /usr/local/bin/rake:23:in `load' /usr/local/bin/rake:23:in `<main>' Tasks: TOP => assets:precompile:primary rake aborted! Command failed with status (1): [/usr/local/bin/ruby21 /usr/local/bin/rake ...] /usr/local/lib/ruby/gems/2.1/gems/rake-10.3.2/lib/rake/file_utils.rb:54:in `block in create_shell_runner' ... /usr/local/lib/ruby/gems/2.1/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' /usr/local/bin/rake:23:in `load' /usr/local/bin/rake:23:in `<main>' Tasks: TOP => assets:precompile
Hello again,
which version of OpenProject you use?
Best
Ratzi
Core Version
OpenProject 3.0.8 (PostgreSQL)
on FreeBSD 9.3
But there are a few “jquery.ui.all.” files underneath openproject/public/assets
It seems there is a problem with the path where the precompile process looks for its files.
If I make a link
ln -s /usr/local/openproject/public/assets/jquery.ui.all.js /usr/local/openproject/lib/assets/javascripts/
query.ui.all is found an the next file is missing:
rake aborted! Sprockets::FileNotFound: couldn't find file 'jquery.ui.accordion' (in /usr/local/openproject/lib/assets/javascripts/jquery.ui.all.js:1)
In “app/assets/javascripts/application.js.erb” two folders are referenced to find files:
lib/assets/javascripts and vendor/assets/javascripts,
But also on the opf github source they are nearly empty..
What to do?
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery.ui.all //= require jquery-ui-i18n //= require jquery.atwho //= require jquery_ujs //= require jquery_noconflict //= require jquery.colorcontrast //= require jquery.trap //= require prototype //= require effects //= require dragdrop //= require controls //= require i18n //= require i18n/translations //= require select2 //= require top_menu //= require action_menu //= require openproject //= require breadcrumb //= require findDomElement //= require context_menu //= require jstoolbar //= require ajaxappender //= require settings //= require modal //= require keyboard_shortcuts //= require top-shelf //= require unsupported-browsers //= require autocomplete_textareas //= require_tree ./specific //= require openproject_plugins //= require versions
I’ve copied all *.js files from openproject/public/assets/ to openproject/app/assets/javascript/ and the jquery.ui.all.css from openproject/public/assets/ to openproject/app/assets/stylesheets. Then it works.
But what is the reason the files are not found? should they be in “openproject/app/assets/…” or is the path “openproject/public/assets” not in the precompilation configuration?