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

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Installation fails on webpack configuration

Installation fails on webpack configuration

Added by Marc Joos almost 9 years ago

Dear all,

When I try to install OpenProject, installation fails on the configuration step. When I launch:

openproject [re]configure

I get the following:

(npm bin)/webpack --config webpack.config.js
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/shared_helpers.rb:78: warning: Insecure world writable dir /opt/soft in PATH, mode 040777
^

SyntaxError: Unexpected token /
    at Object.parse (native)
    at Object.<anonymous> (/opt/openproject/frontend/rails-plugins.conf.js:49:17)
    at Object.memoized [as allPluginNamesPaths] (/opt/openproject/frontend/node_modules/lodash/dist/lodash.js:5570:32)
    at Object.OpenProjectPlugins.pluginNamesPaths (/opt/openproject/frontend/rails-plugins.conf.js:53:26)
    at Object.<anonymous> (/opt/openproject/frontend/rails-plugins.conf.js:75:56)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
rake aborted!
Command failed with status (1): [$(npm bin)/webpack --config webpack.config...]
/opt/openproject/lib/tasks/assets.rake:48:in `block (3 levels) in <top (required)>'
/opt/openproject/lib/tasks/assets.rake:47:in `chdir'
/opt/openproject/lib/tasks/assets.rake:47:in `block (2 levels) in <top (required)>'
/opt/openproject/lib/tasks/packager.rake:54:in `block (2 levels) in <top (required)>'
Tasks: TOP => assets:precompile => assets:compile_environment => assets:webpack
(See full trace by running task with --trace)

On the other hand, if I run independently

$(npm bin)/webpack --config webpack.config.js

in frontend/, it does work without problem…

What could I do to end OpenProject configuration?

I’m running under RHEL7.

Thanks by advance!


Replies (8)

RE: Installation fails on webpack configuration - Added by Marc Joos almost 9 years ago

It seems that my Ruby version was too old (2.0) so I installed a newer version of Ruby (2.3.0) via RVM.

Then, I tried different things but everything is failing. First, I try to rerun:

openproject reconfigure

But I get an error message:

Your Ruby version is 2.1.6, but your Gemfile specified 2.3.0

I don’t get it since ruby -v tells me:

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

And I don’t get where I could change this in the configuration process of OpenProject (the config:set is rather obscure).

Second, I tried to configure things manually.

bundle install

worked and everything seems to be OK. My database is set, and:

RAILS_ENV="production" bundle exec rake db:migrate
RAILS_ENV="production" bundle exec rake db:seed

both succeeded. Then, when I launched:

RAILS_ENV="production" bundle exec rake assets:precompile

it failed once again:

$(npm bin)/webpack --config webpack.config.js
Ignoring ffi-1.9.10 because its extensions are not built.  Try: gem pristine ffi --version 1.9.10
Ignoring kgio-2.9.3 because its extensions are not built.  Try: gem pristine kgio --version 2.9.3
Ignoring mysql2-0.3.20 because its extensions are not built.  Try: gem pristine mysql2 --version 0.3.20
Ignoring nokogiri-1.6.7.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.7.2
Ignoring oj-2.11.5 because its extensions are not built.  Try: gem pristine oj --version 2.11.5
Ignoring passenger-5.0.22 because its extensions are not built.  Try: gem pristine passenger --version 5.0.22
Ignoring pg-0.18.3 because its extensions are not built.  Try: gem pristine pg --version 0.18.3
Ignoring raindrops-0.13.0 because its extensions are not built.  Try: gem pristine raindrops --version 0.13.0
Ignoring sqlite3-1.3.11 because its extensions are not built.  Try: gem pristine sqlite3 --version 1.3.11
Ignoring syck-1.0.5 because its extensions are not built.  Try: gem pristine syck --version 1.0.5
Ignoring unf_ext-0.0.7.2 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.2
{"omniauth-openid-connect":"/opt/openproject/vendor/bundle/ruby/2.3.0/bundler/gems/omniauth-openid-connect-c3bce4c9e9ac","omniauth-openid_connect-providers":"/opt/openproject/vendor/bundle/ruby/2.3.0/bundler/gems/omniauth-openid_connect-providers-86f3670e127e","openproject-announcements":"/opt/openproject/vendored-plugins/openproject-announcements","openproject-auth_plugins":"/opt/openproject/vendored-plugins/openproject-auth_plugins","openproject-pdf_export":"/opt/openproject/vendored-plugins/openproject-pdf_export","openproject-backlogs":"/opt/openproject/vendored-plugins/openproject-backlogs","openproject-costs":"/opt/openproject/vendored-plugins/openproject-costs","openproject-documents":"/opt/openproject/vendored-plugins/openproject-documents","openproject-webhooks":"/opt/openproject/vendored-plugins/openproject-webhooks","openproject-github_integration":"/opt/openproject/vendored-plugins/openproject-github_integration","openproject-global_roles":"/opt/openproject/vendored-plugins/openproject-global_roles","openproject-help_link":"/opt/openproject/vendored-plugins/openproject-help_link","openproject-local_avatars":"/opt/openproject/vendored-plugins/openproject-local_avatars","openproject-meeting":"/opt/openproject/vendored-plugins/openproject-meeting","openproject-my_project_page":"/opt/openproject/vendored-plugins/openproject-my_project_page","openproject-openid_connect":"/opt/openproject/vendored-plugins/openproject-openid_connect","reporting_engine":"/opt/openproject/vendored-plugins/reporting_engine","openproject-reporting":"/opt/openproject/vendored-plugins/openproject-reporting","openproject-themes-dark":"/opt/openproject/vendored-plugins/openproject-themes-dark","openproject-translations":"/opt/openproject/vendor/bundle/ruby/2.3.0/bundler/gems/openproject-translations-a9056536ff7b","openproject-xls_export":"/opt/openproject/vendored-plugins/openproject-xls_export"}

undefined:1
Ignoring ffi-1.9.10 because its extensions are not built.  Try: gem pristine f
^
SyntaxError: Unexpected token I
    at Object.parse (native)
    at Object.OpenProjectPlugins.allPluginNamesPaths (/opt/openproject/frontend/rails-plugins.conf.js:49:17)
    at Object.memoized [as allPluginNamesPaths] (/opt/openproject/frontend/node_modules/lodash/dist/lodash.js:5570:32)
    at Object.OpenProjectPlugins.pluginNamesPaths (/opt/openproject/frontend/rails-plugins.conf.js:53:26)
    at Object.<anonymous> (/opt/openproject/frontend/rails-plugins.conf.js:75:56)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
rake aborted!
Command failed with status (8): [$(npm bin)/webpack --config webpack.config...]
/opt/openproject/lib/tasks/assets.rake:48:in `block (3 levels) in <top (required)>'
/opt/openproject/lib/tasks/assets.rake:47:in `chdir'
/opt/openproject/lib/tasks/assets.rake:47:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli/exec.rb:24:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli.rb:304:in `exec'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/cli.rb:11:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/exe/bundle:27:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.4/exe/bundle:19:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `load'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => assets:precompile => assets:compile_environment => assets:webpack
(See full trace by running task with --trace)

I don’t really get what is happening; I tried to reinstall gems; for example, I ran:

gems install ffi --version=1.9.10
gems pristine ffi --version=1.9.10

but I still get the same error.

I don’t know what to try next.

Any help would be greatly appreciated!

RE: Installation fails on webpack configuration - Added by Oliver Günther almost 9 years ago

Hi Marc,

The webpack process uses the output of ./bin/plugin_info to infer about installed plugins in OpenProject in order to process their assets.
As it parses the output as JSON, and your output seems to include the following line: Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi, the process seems to fail.

I’ll try to look into why that would be included in the output (since that warning should land in STDERR instead), but you may continue trying to fix the ffi issue in order to resolve the issue.

Best,
Oliver

RE: Installation fails on webpack configuration - Added by Marc Joos almost 9 years ago

Hi Olivier,

Thanks for your answer.

I don’t get though which JSON is read and where it is located. Perhaps I could just delete the faulting lines. Or try to regenerate this file, but I don’t get how I could do that. In the mean time, I reinstalled all the missing dependencies (ffi, kgio and so on) but still get the same error message.

Best,
Marc

RE: Installation fails on webpack configuration - Added by Oliver Günther almost 9 years ago

The JSON parsed by webpack is the output of <Your OpenProject root>./bin/plugin_info.

You can run that file manually and it will print that ffi warning.

Best,
Oliver

RE: Installation fails on webpack configuration - Added by Oliver Günther almost 9 years ago

Could you also try to run the pristine command in context of the OpenProject user as follows?

openproject run gem pristine ffi --version=1.9.10

Best,
Oliver

RE: Installation fails on webpack configuration - Added by Marc Joos almost 9 years ago

Thanks for your answers.

If I run

ruby [OpenProject root]./bin/plugin_info

I get:

{"omniauth-openid-connect":"/opt/openproject/vendor/bundle/ruby/2.3.0/bundler/gems/omniauth-openid-connect-c3bce4c9e9ac","omniauth-openid_connect-providers":"/opt/openproject/vendor/bundle/ruby/2.3.0/bundler/gems/omniauth-openid_connect-providers-86f3670e127e","openproject-announcements":"/opt/openproject/vendored-plugins/openproject-announcements","openproject-auth_plugins":"/opt/openproject/vendored-plugins/openproject-auth_plugins","openproject-pdf_export":"/opt/openproject/vendored-plugins/openproject-pdf_export","openproject-backlogs":"/opt/openproject/vendored-plugins/openproject-backlogs","openproject-costs":"/opt/openproject/vendored-plugins/openproject-costs","openproject-documents":"/opt/openproject/vendored-plugins/openproject-documents","openproject-webhooks":"/opt/openproject/vendored-plugins/openproject-webhooks","openproject-github_integration":"/opt/openproject/vendored-plugins/openproject-github_integration","openproject-global_roles":"/opt/openproject/vendored-plugins/openproject-global_roles","openproject-help_link":"/opt/openproject/vendored-plugins/openproject-help_link","openproject-local_avatars":"/opt/openproject/vendored-plugins/openproject-local_avatars","openproject-meeting":"/opt/openproject/vendored-plugins/openproject-meeting","openproject-my_project_page":"/opt/openproject/vendored-plugins/openproject-my_project_page","openproject-openid_connect":"/opt/openproject/vendored-plugins/openproject-openid_connect","reporting_engine":"/opt/openproject/vendored-plugins/reporting_engine","openproject-reporting":"/opt/openproject/vendored-plugins/openproject-reporting","openproject-themes-dark":"/opt/openproject/vendored-plugins/openproject-themes-dark","openproject-translations":"/opt/openproject/vendor/bundle/ruby/2.3.0/bundler/gems/openproject-translations-a9056536ff7b","openproject-xls_export":"/opt/openproject/vendored-plugins/openproject-xls_export"}

I don’t see the ffi warning.

If I run (as openproject user):

openproject run gem pristine ffi --version=1.9.10

I get:

Error loading RubyGems plugin "/usr/local/rvm/gems/ruby-2.3.0@global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": Permission denied @ dir_s_mkdir - /usr/local/rvm/gems/ruby-2.3.0@global/extensions/x86_64-linux/2.1.0-static (Errno::EACCES)
Error loading RubyGems plugin "/usr/local/rvm/gems/ruby-2.3.0@global/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": Permission denied @ dir_s_mkdir - /usr/local/rvm/gems/ruby-2.3.0@global/extensions/x86_64-linux/2.1.0-static (Errno::EACCES)
Restoring gems to pristine condition...
Cached gem for ffi-1.9.10 not found, attempting to fetch...
ERROR:  While executing gem ... (Gem::InstallError)
    invalid gem: No such file or directory @ rb_sysopen - /opt/openproject/vendor/bundle/ruby/2.1.0/cache/ffi-1.9.10.gem

What draws my attention is that it seems to look for ffi in [OpenProject root]./vendor/bundle/ruby/2.1.0 whereas I am using Ruby 2.3.0… So it seems that there are some confusion with my Ruby versions; I don’t know how to force OpenProject to use 2.3.0 to try to circumvent the issue.

Thanks again,
Marc

RE: Installation fails on webpack configuration - Added by Oliver Günther almost 9 years ago

Hey Marc,

the packaged installation of OpenProject ships with its own ruby instance. If you start forcing other ruby versions on there, we cannot really find out what’s going on exactly.
Please inspect the env to ensure that if you’re running as the openproject user, it uses the bundled ruby.

(You can spawn a shell with openproject run bash).

Best,
Oliver

RE: Installation fails on webpack configuration - Added by Marc Joos almost 9 years ago

OK, I didn’t get that it ships with its own Ruby instance.

I started again from a clean slate (I remove OpenProject with my package manager, delete the /opt/openproject directory and reinstalled it); this time the configuration step worked fine and OpenProject is smoothly running. I guess all the fiddling I did with Ruby corrected the ruby problems I got in the meantime.

Thanks again for your help!
Marc

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