Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Plugins
  1. OpenProject
  2. Forums
  3. Plugins
  4. documents/documents.css isn't precompiled

documents/documents.css isn't precompiled

Added by Luis L about 11 years ago

Hi,

I have installed OpenProject at Centos following the guide and everything was working fine at the very beginning. After i installed the Documents plugin, when I click on the [Activity] on the left nav bar, it will show a 500 error page to me. Below is the error message i found at the end of the error log. Is there any idea how to resolve it? Thank you!!

ActionView::Template::Error (documents/documents.css isn't precompiled):
    30:
    31: ++#%>
    32:
    33: <%= stylesheet_link_tag 'documents/documents.css' %>
  lib/redmine/hook.rb:127:in `block in render_on'
  lib/redmine/hook.rb:73:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:73:in `each'
  lib/redmine/hook.rb:73:in `block in call_hook'
  lib/redmine/hook.rb:70:in `tap'
  lib/redmine/hook.rb:70:in `call_hook'
  lib/redmine/hook.rb:174:in `call_hook'
  app/views/activities/index.html.erb:30:in `_app_views_activities_index_html_erb___4366668785892016613_72415860'

Replies (14)

RE: documents/documents.css isn't precompiled - Added by Hagen Schink about 11 years ago

Hi Luis,

after installation of OpenProject Documents have you run bundle exec rake assets:precompile again?

Kind regards,
Hagen

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

I have tried to run it again. However, same error. Any idea? Thank you!!!!

[openproject@SCG-P-OPENPRJ01 openproject]$ bundle exec rake assets:precompile
Bundler.require... 2.230s
/home/openproject/.rvm/rubies/ruby-2.1.0/bin/ruby /home/openproject/.rvm/gems/ruby-2.1.0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
require 'rails/all'... 0.370s
Bundler.require... 0.930s
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.
2.260s
require 'rails/all'... 0.380s
Bundler.require... 1.050s
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.
2.560s

RE: documents/documents.css isn't precompiled - Added by Hagen Schink about 11 years ago

Hi Luis,

if you bundled everything and ran asset pre-compilation, then, unfortunately, I have no other idea. :-(

Kind regards,
Hagen

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

In [Gemfile.plugins], I have below two lines in the plugin file. Is there anything i missed? Or anywhere i can check? Thank you!

gem "openproject-plugins", git: "https://github.com/opf/openproject-plugins.git", :branch => "stable"
gem "openproject-documents", git: "https://github.com/opf/openproject-documents.git", :branch => "stable"

RE: documents/documents.css isn't precompiled - Added by Hagen Schink about 11 years ago

Hello Luis,

as far as I can see you did everything according to the documentation. So, at the moment I have no answer.

Kind regards,
Hagen

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

Yes, I have follow the instruction but still…

under /openproject/public/assets/documents/, I can see the [documents.css] there, how come the error log said documents/documents.css isn’t precompiled?

[openproject@SCG-P-OPENPRJ01 documents]$ ls
documents-6679a49176654768cdcdad442fa3b8c8.css     documents.css
documents-6679a49176654768cdcdad442fa3b8c8.css.gz  documents.css.gz

inside [documents.css], it has only one line

dt.document:before{content:"\e006"}

RE: documents/documents.css isn't precompiled - Added by Christian Ratz about 11 years ago

Hello Luis,

we recently changed some stuff related to asset precompiling so if you have a wrong combination of OpenProject core, OpenProject-Documents plugin and OpenProject-Plugins plugin it will not work.

Try one of the following combinations:

OpenProject core 
  branch: dev
Documents
  branch: dev
Plugins
  branch: dev

OR

OpenProject core 
  branch: stable
Documents
  branch: stable
Plugins
  branch: stable

Best
Ratzi

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

Hello Ratzi,

I have tried to turn the branch from stable to dev in [Gemfile.plugins], run bundle update and bundle exec rake assets:precompile. However, same error log.

gem "openproject-plugins", git: "https://github.com/opf/openproject-plugins.git", :branch => "dev" 
gem "openproject-documents", git: "https://github.com/opf/openproject-documents.git", :branch => "dev" 

Did i missed the OpenProject core?? where should i put it?? Thank you!

RE: documents/documents.css isn't precompiled - Added by Christian Ratz about 11 years ago

Hello Luis,

you can use a specific version of the OpenProject core by checking out the corresponding git branch.

Go to your OpenProject root folder and run the following commands, assuming you used git for the inital setup and you wanna use the ‘dev’ branch:

git checkout Gemfile.lock
git checkout dev
bundle install
RAILS_ENV=production bundle exec rake assets:precompile

Best
Ratzi

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

Hello Ratzi,

I have run those commands but same error log. Any idea? Thank you for your time!!

[openproject@SCG-P-OPENPRJ01 openproject]$ git checkout Gemfile.lock
[openproject@SCG-P-OPENPRJ01 openproject]$ git checkout dev
M       config/settings.yml
Already on 'dev'
[openproject@SCG-P-OPENPRJ01 openproject]$ bundle install
Updating https://github.com/opf/openproject-plugins.git
Updating https://github.com/opf/openproject-documents.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.1.0
Using i18n 0.6.5
Using multi_json 1.8.2
Using activesupport 3.2.17
Using builder 3.0.4
Using activemodel 3.2.17
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.2
Using actionpack 3.2.17
Using mime-types 1.25.1
Using polyglot 0.3.3
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.17
Using arel 3.0.3
Using tzinfo 0.3.38
Using activerecord 3.2.17
Using activerecord-tableless 1.3.3
Using activeresource 3.2.17
Using acts_as_list 0.2.0
Using addressable 2.3.4
Using awesome_nested_set 2.1.6
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using metaclass 0.0.1
Using mocha 0.13.3
Using bourne 1.4.0
Using bundler 1.6.2
Using columnize 0.3.6
Using debugger-linecache 1.2.0
Using byebug 2.3.1
Using nokogiri 1.5.9
Using xpath 2.0.0
Using capybara 2.1.0
Using capybara-screenshot 0.3.6
Using timers 1.1.0
Using celluloid 0.15.2
Using ffi 1.9.3
Using childprocess 0.3.9
Using simplecov-html 0.7.1
Using simplecov 0.8.0.pre
Using codeclimate-test-reporter 0.1.1
Using coderay 1.0.9
Using coffee-script-source 1.6.2
Using execjs 1.4.0
Using coffee-script 2.2.0
Using rack-ssl 1.3.3
Using json 1.8.1
Using rdoc 3.12.2
Using thor 0.18.1
Using railties 3.2.17
Using coffee-rails 3.2.2
Using color-tools 1.3.0
Using diff-lcs 1.2.4
Using gherkin 2.12.2
Using multi_test 0.0.2
Using cucumber 1.3.8
Using rails 3.2.17
Using cucumber-rails 1.3.1
Using cucumber-rails-training-wheels 1.0.0
Using daemons 1.1.9
Using dalli 2.6.4
Using database_cleaner 1.0.1
Using date_validator 0.7.0
Using delayed_job 3.0.5
Using delayed_job_active_record 0.3.3
Using eventmachine 1.0.3
Using factory_girl 4.2.0
Using factory_girl_rails 4.2.1
Using faker 1.2.0
Using formatador 0.2.4
Using paper_trail 2.7.2
Using globalize 3.0.0
Using rb-fsevent 0.9.3
Using rb-inotify 0.9.2
Using listen 2.1.2
Using lumberjack 1.0.4
Using method_source 0.8.2
Using slop 3.4.6
Using pry 0.9.12.2
Using guard 2.2.2
Using guard-cucumber 1.4.0
Using rspec-core 2.13.1
Using rspec-expectations 2.13.0
Using rspec-mocks 2.13.1
Using rspec 2.13.0
Using guard-rspec 3.1.0
Using test-unit 2.5.5
Using guard-test 1.0.0
Using htmldiff 0.0.1
Using i18n-js 3.0.0.rc5 from https://github.com/fnando/i18n-js.git (at 8801f8d)
Using interception 0.3
Using jquery-atwho-rails 0.4.7
Using jquery-rails 2.0.3
Using jquery-ui-rails 4.0.2
Using json_spec 1.1.1
Using launchy 2.3.0
Using letter_opener 1.0.0
Using libv8 3.11.8.17
Using mysql2 0.3.11
Using net-ldap 0.2.2
Using object-daddy 1.1.1
Using oj 2.1.6
Using openproject-plugins 1.0.8 from https://github.com/opf/openproject-plugins.git (at dev)
Using openproject-documents 1.0.1 from https://github.com/opf/openproject-documents.git (at dev)
Using pg 0.17.1
Using prototype-rails 3.2.1
Using prototype_legacy_helper 0.0.0 from https://github.com/rails/prototype_legacy_helper.git (at master)
Using pry-byebug 1.2.0
Using yard 0.8.7.2
Using pry-doc 0.4.6
Using pry-rails 0.3.2
Using pry-rescue 1.1.1
Using pry-stack_explorer 0.4.9.1
Using rabl 0.9.3
Using rack-protection 1.5.2 from https://github.com/finnlabs/rack-protection.git (at 5a7d1bd)
Using rack_session_access 0.1.1
Using rails-dev-tweaks 0.6.1
Using rails_autolink 1.1.0
Using rb-readline 0.5.0
Using ref 1.0.5
Using request_store 1.0.5
Using rspec-example_disabler 0.0.1
Using rspec-rails 2.13.2
Using ruby-openid 2.2.3
Using ruby-prof 0.13.0
Using ruby-progressbar 1.2.0
Using structured_warnings 0.1.4
Using rubytree 0.8.3
Using rubyzip 1.1.0
Using sass 3.2.9
Using sass-rails 3.2.6
Using select2-rails 3.3.2
Using websocket 1.0.7
Using selenium-webdriver 2.39.0
Using shoulda-context 1.1.2
Using shoulda-matchers 2.1.0
Using shoulda 3.5.0
Using sqlite3 1.3.7
Using strong_parameters 0.2.1
Using svg-graph 1.0.5
Using syck 1.0.1
Using therubyracer 0.11.4
Using thin 1.5.1
Using timecop 0.6.1
Using uglifier 2.1.1
Using will_paginate 3.0.5
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
[openproject@SCG-P-OPENPRJ01 openproject]$ RAILS_ENV=production bundle exec rake assets:precompile
require 'rails/all'... 0.520s
Bundler.require... 0.920s
/home/openproject/.rvm/rubies/ruby-2.1.0/bin/ruby /home/openproject/.rvm/gems/ruby-2.1.0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
require 'rails/all'... 0.370s
Bundler.require... 0.920s
Application.initialize!... 2.410s
require 'rails/all'... 0.370s
Bundler.require... 0.910s
Application.initialize!... 2.220s

RE: documents/documents.css isn't precompiled - Added by Christian Ratz about 11 years ago

Hmm, no idea without testing it by my self, I will do this but not now and keep you up to date.

Btw. everything should work if you use the stable branch of the Core, Documents-Plugin and Plugins-Plugin.

Best
Ratzi

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

Same error in the [production.log],

  Rendered activities/index.html.erb within layouts/base (3.2ms)
Completed 500 Internal Server Error in 50.8ms

ActionView::Template::Error (documents/documents.css isn't precompiled):
    30:
    31: ++#%>
    32:
    33: <%= stylesheet_link_tag 'documents/documents.css' %>
  lib/redmine/hook.rb:127:in `block in render_on'
  lib/redmine/hook.rb:73:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:73:in `each'
  lib/redmine/hook.rb:73:in `block in call_hook'
  lib/redmine/hook.rb:70:in `tap'
  lib/redmine/hook.rb:70:in `call_hook'
  lib/redmine/hook.rb:174:in `call_hook'
  app/views/activities/index.html.erb:30:in `_app_views_activities_index_html_erb___4366668785892016613_72415860'

How do i know if i got the latest update of stable version of OpenProject core? just run the below command and run bundle install?

git checkout stable

one stupid question, is there any way to skip/ignore the documents activities under [Activity] by comment out some codes in order to get rid of the error? Thank you!

[openproject@SCG-P-OPENPRJ01 openproject]$ git checkout Gemfile.lock
[openproject@SCG-P-OPENPRJ01 openproject]$ git checkout stable
M       config/settings.yml
Already on 'stable'
[openproject@SCG-P-OPENPRJ01 openproject]$ bundle install
Updating https://github.com/opf/openproject-plugins.git
Updating https://github.com/opf/openproject-documents.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.1.0
Using i18n 0.6.5
Using multi_json 1.8.2
Using activesupport 3.2.17
Using builder 3.0.4
Using activemodel 3.2.17
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.2
Using actionpack 3.2.17
Using mime-types 1.25.1
Using polyglot 0.3.3
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.17
Using arel 3.0.3
Using tzinfo 0.3.38
Using activerecord 3.2.17
Using activerecord-tableless 1.3.3
Using activeresource 3.2.17
Using acts_as_list 0.2.0
Using addressable 2.3.4
Using awesome_nested_set 2.1.6
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using metaclass 0.0.1
Using mocha 0.13.3
Using bourne 1.4.0
Using bundler 1.6.2
Using columnize 0.3.6
Using debugger-linecache 1.2.0
Using byebug 2.3.1
Using nokogiri 1.5.9
Using xpath 2.0.0
Using capybara 2.1.0
Using capybara-screenshot 0.3.6
Using timers 1.1.0
Using celluloid 0.15.2
Using ffi 1.9.3
Using childprocess 0.3.9
Using simplecov-html 0.7.1
Using simplecov 0.8.0.pre
Using codeclimate-test-reporter 0.1.1
Using coderay 1.0.9
Using coffee-script-source 1.6.2
Using execjs 1.4.0
Using coffee-script 2.2.0
Using rack-ssl 1.3.3
Using json 1.8.1
Using rdoc 3.12.2
Using thor 0.18.1
Using railties 3.2.17
Using coffee-rails 3.2.2
Using color-tools 1.3.0
Using diff-lcs 1.2.4
Using gherkin 2.12.2
Using multi_test 0.0.2
Using cucumber 1.3.8
Using rails 3.2.17
Using cucumber-rails 1.3.1
Using cucumber-rails-training-wheels 1.0.0
Using daemons 1.1.9
Using dalli 2.6.4
Using database_cleaner 1.0.1
Using date_validator 0.7.0
Using delayed_job 3.0.5
Using delayed_job_active_record 0.3.3
Using eventmachine 1.0.3
Using factory_girl 4.2.0
Using factory_girl_rails 4.2.1
Using faker 1.2.0
Using formatador 0.2.4
Using paper_trail 2.7.2
Using globalize 3.0.0
Using rb-fsevent 0.9.3
Using rb-inotify 0.9.2
Using listen 2.1.2
Using lumberjack 1.0.4
Using method_source 0.8.2
Using slop 3.4.6
Using pry 0.9.12.2
Using guard 2.2.2
Using guard-cucumber 1.4.0
Using rspec-core 2.13.1
Using rspec-expectations 2.13.0
Using rspec-mocks 2.13.1
Using rspec 2.13.0
Using guard-rspec 3.1.0
Using test-unit 2.5.5
Using guard-test 1.0.0
Using htmldiff 0.0.1
Using i18n-js 3.0.0.rc5 from https://github.com/fnando/i18n-js.git (at 8801f8d)
Using interception 0.3
Using jquery-atwho-rails 0.4.1
Using jquery-rails 2.0.3
Using jquery-ui-rails 4.0.2
Using json_spec 1.1.1
Using launchy 2.3.0
Using letter_opener 1.0.0
Using libv8 3.11.8.17
Using mysql2 0.3.11
Using net-ldap 0.2.2
Using object-daddy 1.1.1
Using oj 2.1.6
Using openproject-plugins 1.0.8 from https://github.com/opf/openproject-plugins.git (at stable)
Using openproject-documents 1.0.1 from https://github.com/opf/openproject-documents.git (at stable)
Using pg 0.17.1
Using prototype-rails 3.2.1
Using prototype_legacy_helper 0.0.0 from https://github.com/rails/prototype_legacy_helper.git (at master)
Using pry-byebug 1.2.0
Using yard 0.8.7.2
Using pry-doc 0.4.6
Using pry-rails 0.3.2
Using pry-rescue 1.1.1
Using pry-stack_explorer 0.4.9.1
Using rabl 0.9.3
Using rack-protection 1.5.2 from https://github.com/finnlabs/rack-protection.git (at 5a7d1bd)
Using rack_session_access 0.1.1
Using rails-dev-tweaks 0.6.1
Using rails_autolink 1.1.0
Using rb-readline 0.5.0
Using ref 1.0.5
Using request_store 1.0.5
Using rmagick 2.13.2
Using rspec-example_disabler 0.0.1
Using rspec-rails 2.13.2
Using ruby-openid 2.2.3
Using ruby-prof 0.13.0
Using ruby-progressbar 1.2.0
Using structured_warnings 0.1.4
Using rubytree 0.8.3
Using rubyzip 1.1.0
Using sass 3.2.9
Using sass-rails 3.2.6
Using select2-rails 3.3.2
Using websocket 1.0.7
Using selenium-webdriver 2.39.0
Using shoulda-context 1.1.2
Using shoulda-matchers 2.1.0
Using shoulda 3.5.0
Using sqlite3 1.3.7
Using strong_parameters 0.2.1
Using svg-graph 1.0.5
Using syck 1.0.1
Using therubyracer 0.11.4
Using thin 1.5.1
Using timecop 0.6.1
Using uglifier 2.1.1
Using will_paginate 3.0.5
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
[openproject@SCG-P-OPENPRJ01 openproject]$ RAILS_ENV=production bundle exec rake assets:precompile
require 'rails/all'... 0.370s
Bundler.require... 0.950s
/home/openproject/.rvm/rubies/ruby-2.1.0/bin/ruby /home/openproject/.rvm/gems/ruby-2.1.0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
require 'rails/all'... 0.380s
Bundler.require... 0.930s
Application.initialize!... 2.260s
require 'rails/all'... 0.380s
Bundler.require... 0.930s
Application.initialize!... 2.370s

RE: documents/documents.css isn't precompiled - Added by Luis L about 11 years ago

it works after restarted Apache service (with the stable steps)!!! thanks Tobias!!!

RE: documents/documents.css isn't precompiled - Added by Deleted user almost 11 years ago

I had this same error, but in my case documents was not getting precompiled in the production environment. I tracked it down to a missing initializer in the documents engine.

I added this code to lib/open_project/documents/engine.rb

    initializer "documents.precompile_assets" do
      Rails.application.config.assets.precompile += %w(documents/documents.css)
    end

and it fixed the problem.

  • (1 - 14/14)
Loading...