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

Development
  1. OpenProject
  2. Forums
  3. Development
  4. Contributing (First Steps) on Mac

Contributing (First Steps) on Mac

Added by Rince wind about 3 years ago

Hi there,

Since one of the first things you wrote is “Get in touch”, I’m doing so :)
Side note: you might want to write in your README under contributing, that the forum is the way to go? I tried it via e-mail and ... it took ages :D

First of all:
I’d love tackle a few small features and bugs myself but I have to say, I’m having a hard time understanding how the code works and where the stuff is located I have to change. Even though you have a beautiful documentation, I’m having a hard time understanding how you came up with your directory structure. For instance: It took me quite some time to understand that the folder “spec” contains tests. I’ve never heard of tests being referred as “spec”. I didn’t read that far in the documentation at that point to be honest, after reading “Testing Openproject” it was clear but if you just use the search engine from GitHub it can get quite confusing.
I’m also not getting behind the “core” “features” and “shared” folders in the frontend source. All I know is I never end up in the correct folder by the first guess. Would be great, if you could explain that very quickly.

Some small feedback on the MacOS development environment:
It was surprisingly straight forward. Although here are the things I had to do differently:
- Both nodenv init and rbenv don’t work out of the box for fish. I didn’t look further into it but since zsh (and not bash) is now the new default for MacOS you might put a trouble shooting hint in there, that one has to keep his shell in mind.
- On Apple Silicon the Postgres database is not installed at /usr/local/... anymore but in /opt/openproject/…
- I had to run “gem install bundler” as sudo. Very much possible that that’s due to the increased security coming with macOS Catalina and onward.
- Its worth noting that I symlinked /usr/local/bin into the new home-brew location on Apple Silicon. So in case anyone ever has major problems with the PATH… I’d highly recommend doing it anyway.
Everything else worked great!

The tests are a hole other story. I had to install Chrome in order to make them “compile” at all. After installing the tests still fail. I’m pretty sure it’s because Chrome just works differently on MacOS? I have no way to confirm that though. Do you have any experience on running the tests on MacOS?

Also, I'd be really interested to hear from anyone about your development environment -- what IDE do you use etc... 

Best, Rincewind


Replies (6)

RE: Contributing (First Steps) on Mac - Added by Adam Szabo about 3 years ago

Hi Rincewind

there is a lack of docs for M1, its brand new.

If you like to contribute: Feel free to add your commits to the documentation on your fork of openproject for M1 on MacOS here:
Please add those to the "release/12.0" branch, later use the current release branch

https://www.openproject.org/docs/development/development-environment-osx/

If you like to develop: please try to use the docker dev environment for your M1 MacOS here, there is feedback that it works for M1 MacOS also:

https://www.openproject.org/docs/development/development-environment-docker/

PS, please could you reference the README file you mentioned with a link? we have 1000s of README files :)

RE: Contributing (First Steps) on Mac - Added by Rince wind about 3 years ago

Thanks, I'll try the docker setup.

Still, do you have any recommendations about IDE(s) to use? 

The main README here: https://github.com/opf/openproject should link the forum at contact us. As you probably noticed from the mail: took me one month to notice that it won't work via e-mail :D

Also: do you have any further material / papers how to write tests?

RE: RE: Contributing (First Steps) on Mac - Added by Oliver Günther about 3 years ago

Hi Rincewind,

we recommend you use VS Code or if you have an IntelliJ license / student license, many developers are also using RubyMine / Webstorm.

There is not one guide to help you get up to speed with RSpec and OpenProject. However, a basic tutorial on rspec might provide enough insights in its syntax to be able to start reading and writing tests. https://www.rubyguides.com/2018/07/rspec-tutorial/

Best

Oliver

RE: Contributing (First Steps) on Mac - Added by Rince wind almost 3 years ago

So, I gave the docker contribution setup a shot and it fails during bin/compose setup. Docker is installed and running on my Apple Silicon Mac using Docker Desktop (and of course brew install docker docker-compose.

ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17:

  /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so

  If that's the case, then please install Nokogiri via the `ruby` platform gem:
      gem install nokogiri --platform=ruby
  or:
      bundle config set force_ruby_platform true

  Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help.


ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17:

  /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so

  If that's the case, then please install Nokogiri via the `ruby` platform gem:
      gem install nokogiri --platform=ruby
  or:
      bundle config set force_ruby_platform true

  Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help.

/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:10:in `rescue in <main>': 
ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17:

  /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so

  If that's the case, then please install Nokogiri via the `ruby` platform gem:
      gem install nokogiri --platform=ruby
  or:
      bundle config set force_ruby_platform true

  Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help.

 (StructuredWarnings::StandardWarning)
rake aborted!
LoadError: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `block in require'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in `<main>'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `block in require'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `<main>'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `block in require'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/bundle/gems/activesupport-6.1.4.6/lib/active_support/dependencies.rb:332:in `require'
/usr/local/bundle/gems/html-pipeline-2.14.0/lib/html/pipeline.rb:3:in `<main>'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:73:in `rescue in block in require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:51:in `block in require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:44:in `each'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:44:in `require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler.rb:176:in `require'
/home/dev/openproject/config/application.rb:58:in `<top (required)>'
/home/dev/openproject/rakefile:33:in `require'
/home/dev/openproject/rakefile:33:in `<top (required)>'
/usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
/usr/local/bundle/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'

Caused by:
LoadError: cannot load such file -- html-pipeline
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
/usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:55:in `each'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:55:in `block in require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:44:in `each'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/runtime.rb:44:in `require'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler.rb:176:in `require'
/home/dev/openproject/config/application.rb:58:in `<top (required)>'
/home/dev/openproject/rakefile:33:in `require'
/home/dev/openproject/rakefile:33:in `<top (required)>'
/usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
/usr/local/bundle/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

RE: Contributing (First Steps) on Mac - Added by kerstin rubialejos over 2 years ago

What are the exact reasons you prefer macOS and not Windows? And am thinking about the transition now, and I want to make a list of pros and cons to help myself make a final decision. Because if I decide to switch, then it’s forever or for at least ten years because I don’t have enough time and resources to jump from one OS to another often. I have done some reading on ข่าว IT, and it made me think that MacOS would be more beneficial for my work. However, I cannot be sure about that 100%. That’s why I am doing my research on the topic before deciding anything.

RE: Contributing (First Steps) on Mac - Added by Rince wind over 2 years ago

I need a system that is robust and doesn't let me down. Really depends on what you want to do, but for me, I wouldn't ever go to Windows again. I got it all -- Macs, iPads, iPhone, AirPods they way it just seamlessly integrates is worth having to go through some trouble (looking at your cons list ;). I can also recommend it as a development environment. The new M1 Macs are blazing fast and compile stuff in times you can't imagine. My M1 Max MacBook ripped my colleagues MacPro Tower in half.

But, you have to be comfortable with the fact, that not all software runs on Mac, especially games...

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