tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Common logic for Ruby gem dependencies?



Hi all,

I am working on packaging OpenProject that is a project management software written in Ruby on Rails and Angular.

I first tried to manually install this software by following the [manual installation guide](https://www.openproject.org/fr/docs/installation-and-operations/installation/manual/) and by using `bundle install`. But this approach failed with errors in compilation of gem extensions for which I did not want to insist on finding a workaround. The failing gem (commonmarker) is packaged in textproc/ruby-commonmarker. Maybe i have a chance to get out of this via pkgsrc.

I took a look at devel/ruby-redmine60 to see the logic behind packaging a Ruby on Rails application. I have a feeling the process is to install the Ruby files in ${DESTDIR}${PREFIX}/${OP_DIR} with e.g. OP_DIR=share/${RUBY_PKGPREFIX}-openproject and to install dependencies by adding their packages to DEPENDS.

There is custom gems as the one below:
# Maintain our own omniauth due to relative URL root issues
# see upstream PR: https://github.com/omniauth/omniauth/pull/903
gem "omniauth", git: "https://github.com/opf/omniauth";, ref: "7eb21563ba047ef86d71f099975587b5ec88f9c9"

I don't know if there is a good practice to handle gems that could be installed either in ${LOCALBASE}/lib/ruby/${RUBY_API_VERSION}/gems (packaged dependencies) or in vendor/bundle subdirectory of the package (custom gems of packaged software).

I don't see common logic to manage Gemfile dependencies as we could find in lang/rust/cargo.mk or lang/go/go-modules.mk. But maybe I didn't look hard enough.

The funny thing is, I have no experience with ruby ​​development, so I'm just learning about gems, bundle, and all that fun stuff. I am open to any advice that might help me move forward.

Fred


Home | Main Index | Thread Index | Old Index