hicknhack-software / redmine_time_tracker

A time tracker plugin for Redmine
Other
106 stars 32 forks source link

Are Ruby 2.3 requirements necessary? #207

Closed ywarnier closed 7 years ago

ywarnier commented 8 years ago

Hi,

I tried installing the plugin on the default Redmine image on DigitalOcean. It's based on an Ubuntu 14.04 image, and the issue is that it doesn't include Ruby 2.3 (only 2.0). This appears as part of the requirements of the redmine_time_tracker when executing bundle install (I believe guard-rake is the one having a strict requirement on Ruby 2.3+).

I tried updating the Ubuntu install to 16.04, but then I get MySQL errors:

LoadError: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.0.0-p643/gems/mysql2-0.3.18/lib/mysql2/mysql2.so

Is the Ruby 2.3 requirement absolutely mandatory? Is there anything that can be done about the libmysqlclient.so.18? (in Ubuntu 16.04, it's libmysqlclient.so.20)

Not a Ruby dev here, so having issues getting all this sorted out. A little help would be appreciated :-)

jume-dev commented 8 years ago

Hey, it is not, atleast in production. In fact we never tested it with Ruby 2.3 so i am not even sure, if it works there. If i understand the problem correctly, you have 2 possibilities to solve it:

  1. You bundle with bundle install --without development test so guard-rake won't be installed and won't fail. Gems from the Gemfile in the group development and test aren't needed for normal usage, so you can safely exclude them.
  2. You install manually a version of guard-rake, which is compatible with a version lower than 2.3 with gem install guard-rake -v 0.0.9 to install it in version 0.0.9. But i doubt its guard-rake, cause it has no requirement for a specific ruby version.

Overall i think no 1 is the option for you to try.

ywarnier commented 8 years ago

The first item work, but then I got the following:

bundle exec rake redmine:plugins:migrate
/var/lib/gems/1.9.1/gems/bundler-1.6.1/lib/bundler/rubygems_integration.rb:248:in `block in replace_gem': rake is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
    from /usr/local/bin/rake:22:in `<main>'

When I follow the 'Add it to Gemfile' recommendation, I add gem 'rake' on line 4 of the Gemfile, then I get:

bundle exec rake redmine:plugins:migrate --trace
(in /var/www/task/redmine3)
rake aborted!
LoadError: cannot load such file -- rails/all
/var/www/task/redmine3/config/application.rb:3:in `require'
/var/www/task/redmine3/config/application.rb:3:in `<top (required)>'
/var/www/task/redmine3/Rakefile:5:in `require'
/var/www/task/redmine3/Rakefile:5:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:79:in `block in run'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/var/lib/gems/1.9.1/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'

Any idea what could fix that one?

jume-dev commented 8 years ago

i am not exactly sure, but this line: /var/lib/gems/1.9.1/gems looks like it tries it with a ruby 1.9.1. Could that be? try running it with rake redmine:plugins:migrate and see if that helps.

jume-dev commented 7 years ago

I assume the issue is resolved as you were not responding anymore