Project

General

Profile

Plugin managment in Wheezy backports

Added by Fidel Mato about 10 years ago

Hi,

Almost no knowledge on Ruby or Rails framework. Our Redmine runs under Debian Wheezy.
Upgrading redmine from 1.4.4 to 2.4.2 (Wheezy Backports, https://packages.debian.org/wheezy-backports/redmine)
I hit some installation errors that were solved when I removed all gems:

gem list | cut -d" " -f1 | xargs gem uninstall -aIx

After re-enabling passenger module Redmine is up and running OK.

I need now to install several plugins, specially redmine_dmsf (https://github.com/danmunn/redmine_dmsf),
but some dependencies were not met. I solved some of them by apt-get installing some packages,
ruby-uuidtools and libzip-ruby1.9.1 , but when running:

rake redmine:plugins:migrate RAILS_ENV="production" 
rake aborted!
undefined method `unicode_names=' for Zip:Module

that I can't solve. I'd been told that

bundle install is the way to go when you install rails apps and redmine plugins

But I'm not confident about debian apt/bundle interactions.

Is bundle install a safe way to manage these dependencies and install plugins?
Is bundle all local to the app and doesn't impact the system gems or collide with apt-get packages?
What is the best way to manage plugins inside a apt Debian installation in order to avoid collisions?

Our environment is:

sh: 1: svn: not found
sh: 1: darcs: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
Environment:
  Redmine version                2.4.2.stable
  Ruby version                   1.9.3-p194 (2012-04-20) [x86_64-linux]
  Rails version                  3.2.6
  Environment                    production
  Database adapter               MySQL
SCM:
  Git                            1.7.10.4
  Filesystem                     
Redmine plugins:
  no plugin installed

Thanks in advance


Replies (5)

RE: Plugin managment in Wheezy backports - Added by Martin Denizet (redmine.org team member) about 10 years ago

Hi Fidel,

Fidel Mato wrote:.]

Is bundle install a safe way to manage these dependencies and install plugins?
Is bundle all local to the app and doesn't impact the system gems or collide with apt-get packages?
What is the best way to manage plugins inside a apt Debian installation in order to avoid collisions?

To my knowledge:
  1. Yes it is safe to run bundle install
  2. apt by itself doesn't install gems (but pre/post install can)
  3. bundle install is really the way the go. Sometime, in can of conflict you may have to adjust the versions required by the plugins Gemfile to make them compatible.

Cheers,

RE: Plugin managment in Wheezy backports - Added by Fidel Mato about 10 years ago

Thank you. I'll try. Bundle doc is a bit difficult for me to understand.

My doubts are mainly with debian/rails/ruby interferences; for example:

...redmine_dmsf# bundle list
Could not find gem 'rubyzip (>= 1.0.0) ruby' in the gems available on this machine.

Must I install rubyzip using bundle or the debian package?

...redmine_dmsf# apt-cache search rubyzip
libzip-ruby1.8 - a ruby module for reading and writing zip files
libzip-ruby1.9.1 - a ruby module for reading and writing zip files

Is at the plugin (redmine/plugins/redmine_dmsf/) directory where I have to work with bundle?
Is it possible to issue a simulated (dry) bundle install?

RE: Plugin managment in Wheezy backports - Added by Martin Denizet (redmine.org team member) about 10 years ago

Hi,
I had the same problem as you several years ago.
I was trying to use only Debian packages because I though it was safer and cleaner.
It turns out that the Bundler is a wonderful tool that does pretty much the same job as apt but specialized for Ruby.I completely dropped Debian packages for the duo RVM/Bundler. Note that you still need to install some Debian packages to get some native code not included in gems. It's still very clean and manageable.
For your problem, don't hesitate to trust the bundler as it is the specialized tool for the task. If you get errors installing gems with the bundler it's will be because of missing native libraries and Google with save you in matter of minutes.
I cannot empathize enough how the bundler made installation/update simple and fast.
If you are not happy with the gem installed by the bundler, you can remove them cleanly with a gem uninstall command.

RE: Plugin managment in Wheezy backports - Added by Fidel Mato about 10 years ago

Hi Martin,

That's good medicine, if Bundler makes the job as apt does
I'll go for it. I'll look also at RVM. Thank you very much.

RE: Plugin managment in Wheezy backports - Added by Martin Denizet (redmine.org team member) about 10 years ago

I'm afraid I misspoke.
bundler and apt don't have the same job. bundler's job is to satisfy Ruby app gem depedencies.
You should use the bundler to install the gem dependencies and if these gem dependencies require native code you will need to use apt to get the said native code.
Cheers,

    (1-5/5)