HugoHasenbein / redmine_more_previews

Redmine plugin to preview various file types in redmine's preview pane
https://www.redmine.org/plugins/redmine_more_previews
GNU General Public License v2.0
46 stars 15 forks source link

bundle install doesn't work #33

Open josefglatz opened 2 years ago

josefglatz commented 2 years ago

redmine              |
redmine              | [!] There was an error parsing `Gemfile`:
redmine              | [!] There was an error parsing `Gemfile`:
redmine              | [!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
redmine              | You specified: rubyzip (~> 2.3.0) and rubyzip (>= 0). Bundler cannot continue.
redmine              |
redmine              |  #  from /home/redmine/redmine/plugins/redmine_more_previews/converters/zippy/Gemfile:1
redmine              |  #  -------------------------------------------
redmine              |  >  gem 'rubyzip'
redmine              |  #  gem 'zlib'
redmine              |  #  -------------------------------------------
redmine              | . Bundler cannot continue.
redmine              |
redmine              |  #  from /home/redmine/redmine/plugins/redmine_more_previews/Gemfile:3
redmine              |  #  -------------------------------------------
redmine              |  #  Dir.glob File.expand_path("../converters/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
redmine              |  >    eval_gemfile file
redmine              |  #  end
redmine              |  #  -------------------------------------------
redmine              | . Bundler cannot continue.
redmine              |
redmine              |  #  from /home/redmine/redmine/Gemfile:106
redmine              |  #  -------------------------------------------
redmine              |  #  Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
redmine              |  >    eval_gemfile file
redmine              |  #  end
redmine              |  #  -------------------------------------------

Redmine 4.2.2
HugoHasenbein commented 2 years ago

Dear Josef,

try to delete

gem 'rubyzip' from the Gemfile

Am 07.10.2021 um 17:51 schrieb Josef Glatz @.***>:

redmine | redmine | [!] There was an error parsing Gemfile: redmine | [!] There was an error parsing Gemfile: redmine | [!] There was an error parsing Gemfile: You cannot specify the same gem twice with different version requirements. redmine | You specified: rubyzip (~> 2.3.0) and rubyzip (>= 0). Bundler cannot continue. redmine | redmine | # from /home/redmine/redmine/plugins/redmine_more_previews/converters/zippy/Gemfile:1 redmine | # ------------------------------------------- redmine | > gem 'rubyzip' redmine | # gem 'zlib' redmine | # ------------------------------------------- redmine | . Bundler cannot continue. redmine | redmine | # from /home/redmine/redmine/plugins/redmine_more_previews/Gemfile:3 redmine | # ------------------------------------------- redmine | # Dir.glob File.expand_path("../converters//{Gemfile,PluginGemfile}", FILE) do |file| redmine | > eval_gemfile file redmine | # end redmine | # ------------------------------------------- redmine | . Bundler cannot continue. redmine | redmine | # from /home/redmine/redmine/Gemfile:106 redmine | # ------------------------------------------- redmine | # Dir.glob File.expand_path("../plugins//{Gemfile,PluginGemfile}", FILE) do |file| redmine | > eval_gemfile file redmine | # end redmine | # -------------------------------------------

Redmine 4.2.2 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRFCRSYSYXJ7LWY2BADUFW6WJANCNFSM5FRTW2YA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

josefglatz commented 2 years ago

The workaround helps. Could you update it or is the error on my side?

HugoHasenbein commented 2 years ago

Dear Josef,

it is redmine version dependent. I'll try to add some lines to check the redmine version.

Best regards

Stephan

Am 07.10.2021 um 18:29 schrieb Josef Glatz @.***>:

The workaround helps. Could you update it or is the error on my side?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/33#issuecomment-937960263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDREJTKIYWARRXOM4Y6LUFXDHTANCNFSM5FRTW2YA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

BigDen86 commented 2 years ago

Dear Stefan, when installing your plugin, here is such an error please help:

F:\Bitnami\Redmine\apps\redmine\htdocs>bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 13.0.3
Using concurrent-ruby 1.1.8
Using i18n 1.8.10
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 5.2.5
Using builder 3.2.4
Using erubi 1.10.0
Using racc 1.5.2 (x64-mingw32)
Using nokogiri 1.11.3 (x64-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.9.1
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.5
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 5.2.5
Using nio4r 2.5.7 (x64-mingw32)
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.3 (x64-mingw32)
Using actioncable 5.2.5
Using globalid 0.4.2
Using activejob 5.2.5
Using mini_mime 1.0.3
Using mail 2.7.1
Using actionmailer 5.2.5
Using method_source 1.0.0
Using thor 1.1.0
Using railties 5.2.5
Using actionpack-xml_parser 2.0.1
Using activemodel 5.2.5
Using arel 9.0.0
Using activerecord 5.2.5
Using marcel 1.0.1
Using activestorage 5.2.5
Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.1.2
Using chunky_png 1.4.0
Using css_parser 1.9.0
Using csv 3.1.9
Using daemons 1.3.1
Using eventmachine 1.2.7 (x64-mingw32)
Using htmlentities 4.3.4
Fetching mimemagic 0.3.10
Installing mimemagic 0.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic
F:/Bitnami/Redmine/ruby/bin/ruby.exe -rrubygems
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/exe/rake
RUBYARCHDIR\=F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/extensions/x64-mingw32/2.6.0/mimemagic-0.3.10
RUBYLIBDIR\=F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/extensions/x64-mingw32/2.6.0/mimemagic-0.3.10
rake aborted!
Could not find MIME type database in the following locations:
["/usr/local/share/mime/packages/freedesktop.org.xml",
"/opt/homebrew/share/mime/packages/freedesktop.org.xml",
"/opt/local/share/mime/packages/freedesktop.org.xml",
"/usr/share/mime/packages/freedesktop.org.xml"]

Ensure you have either installed the shared-mime-info package for your
distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to
the location
of that file.

This gem might be installed as a dependency of some bigger package, such as
rails, activestorage,
axlsx or cucumber. While most of these packages use the functionality of this
gem, some gems have
included this gem by accident. Set USE_FREEDESKTOP_PLACEHOLDER=true if you are
certain that you
do not need this gem, and wish to skip the inclusion of freedesktop.org.xml.

The FREEDESKTOP_PLACEHOLDER option is meant as a transitional feature, and will
be deprecated in
the next release.
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic/Rakefile:15:in
`locate_mime_database'
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic/Rakefile:39:in
`block in <top (required)>'
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/exe/rake:27:in
`<main>'
Tasks: TOP => default
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10
for inspection.
Results logged to
F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/extensions/x64-mingw32/2.6.0/mimemagic-0.3.10/gem_make.out

An error occurred while installing mimemagic (0.3.10), and Bundler cannot
continue.
Make sure that `gem install mimemagic -v '0.3.10' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  mimemagic
HugoHasenbein commented 2 years ago

Dear Den,

this seems to be a problem with the mimemagic gem, not redmine_more_previews.

Best regards

Stephan

Am 07.10.2021 um 19:26 schrieb BigDen86 @.***>:

Dear Stefan, when installing your plugin, here is such an error please help:

F:\Bitnami\Redmine\apps\redmine\htdocs>bundle install Fetching gem metadata from https://rubygems.org/.......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies.... Using rake 13.0.3 Using concurrent-ruby 1.1.8 Using i18n 1.8.10 Using minitest 5.14.4 Using thread_safe 0.3.6 Using tzinfo 1.2.9 Using activesupport 5.2.5 Using builder 3.2.4 Using erubi 1.10.0 Using racc 1.5.2 (x64-mingw32) Using nokogiri 1.11.3 (x64-mingw32) Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.9.1 Using rails-html-sanitizer 1.3.0 Using actionview 5.2.5 Using rack 2.2.3 Using rack-test 1.1.0 Using actionpack 5.2.5 Using nio4r 2.5.7 (x64-mingw32) Using websocket-extensions 0.1.5 Using websocket-driver 0.7.3 (x64-mingw32) Using actioncable 5.2.5 Using globalid 0.4.2 Using activejob 5.2.5 Using mini_mime 1.0.3 Using mail 2.7.1 Using actionmailer 5.2.5 Using method_source 1.0.0 Using thor 1.1.0 Using railties 5.2.5 Using actionpack-xml_parser 2.0.1 Using activemodel 5.2.5 Using arel 9.0.0 Using activerecord 5.2.5 Using marcel 1.0.1 Using activestorage 5.2.5 Using public_suffix 4.0.6 Using addressable 2.7.0 Using bundler 2.1.2 Using chunky_png 1.4.0 Using css_parser 1.9.0 Using csv 3.1.9 Using daemons 1.3.1 Using eventmachine 1.2.7 (x64-mingw32) Using htmlentities 4.3.4 Fetching mimemagic 0.3.10 Installing mimemagic 0.3.10 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic F:/Bitnami/Redmine/ruby/bin/ruby.exe -rrubygems F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/extensions/x64-mingw32/2.6.0/mimemagic-0.3.10 RUBYLIBDIR\=F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/extensions/x64-mingw32/2.6.0/mimemagic-0.3.10 rake aborted! Could not find MIME type database in the following locations: ["/usr/local/share/mime/packages/freedesktop.org.xml", "/opt/homebrew/share/mime/packages/freedesktop.org.xml", "/opt/local/share/mime/packages/freedesktop.org.xml", "/usr/share/mime/packages/freedesktop.org.xml"]

Ensure you have either installed the shared-mime-info package for your distribution, or obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.

This gem might be installed as a dependency of some bigger package, such as rails, activestorage, axlsx or cucumber. While most of these packages use the functionality of this gem, some gems have included this gem by accident. Set USE_FREEDESKTOP_PLACEHOLDER=true if you are certain that you do not need this gem, and wish to skip the inclusion of freedesktop.org.xml.

The FREEDESKTOP_PLACEHOLDER option is meant as a transitional feature, and will be deprecated in the next release. F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic/Rakefile:15:in locate_mime_database' F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic/Rakefile:39:in block in <top (required)>' F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/exe/rake:27:in `

' Tasks: TOP => default (See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/mimemagic-0.3.10 for inspection. Results logged to F:/Bitnami/Redmine/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/extensions/x64-mingw32/2.6.0/mimemagic-0.3.10/gem_make.out

An error occurred while installing mimemagic (0.3.10), and Bundler cannot continue. Make sure that gem install mimemagic -v '0.3.10' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: mimemagic — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/33#issuecomment-938002100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRCD4JEOC6SORJMWJLDUFXJ43ANCNFSM5FRTW2YA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

BigDen86 commented 2 years ago

Dear Stefan, can I tell you more about this? I'm new to redmine. How can I solve this problem?

HugoHasenbein commented 2 years ago

Dear Ben,

redmine is programmed in ruby-on-rails. Rails (ruby-on-rails), in fact is a collection of libraries written in ruby plus extension written in c, making some of the rails specific functions (methods) very fast and effective. There are also so called "gems", programmed by authors other than the rails programmers. Gems are further libraries, that even extend the numerous capabilities of rails. One of these gems is mimemagic. Mimemagic is a library that recognizes file types by analyzing either extensions of the file name only, which is not very effective, but often does the job, but also by analyzing the file beginnings, no matter if binary or text. Mimemagic uses a large file in the public domain, in which the file headers are described. This large file is used.

In rails there is a program called "bundle". Bundle keeps track of rails and gems. It is possible to run different programs with different environments of gems. This is to unclutter the rails and gem environment. Bundle also lets you install certain versions of gems. Lets say one program needs and old gem. That gem has proliferated to a brand new version with different behavior than the old gem, an ancestor of the current gem. Bundle can handle this. Bundle knows, which gem to install by Gemfiles. In a gemfile the program authors (redmine authors and redmine plugin authors) define, which version of gem their plugin has been programmed with / designed with.

In your case a Gemfile listed mimemagic. Now bundle tries to install that specfic version from a well known gem server. I often receive install problems from people using bitnami. I am not at all acquainted with bitnami. It seems the bitnami environment is tweaked or configured in a special way - unluckliy these tweaks or configurations do not lead to a smooth function of bundle and ruby-on-rails, it seems.

Further, the authors of mimemagic are pretty active. It MAY be possible, that the mime version your environment (redmine or ay plugin) requests is no longer supported by the authors.

Your install fails to find or install the large file of the mimemagic gem. I assume, there is a community around the mimemagic gem, as mimemagic is an extremely popular gem. The mimemagic community should have some answers to possibly often asked questions about mimemagic failing to install on bitnami. Try to find 'install mimemagic gem on bitnami problem' with google.

best regards

Stephan

Am 07.10.2021 um 19:33 schrieb BigDen86 @.***>:

Dear Stefan, can I tell you more about this? I'm new to redmine. How can I solve this problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/33#issuecomment-938007252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRDTVXX7XW6FQ6PNKY3UFXKU5ANCNFSM5FRTW2YA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

BigDen86 commented 2 years ago

OK, Stefan. Thanks!

acosonic commented 2 years ago

Same thing.

I had to delete mimemagick, then I run bundle update mimemagic to get 0.3.10

and I had to delete rubyzip from

/redmine_more_previews/converters/zippy/Gemfile

mmtechslv commented 2 years ago

Deleting rubyzip from /redmine_more_previews/converters/zippy/Gemfile worked for me

Aratilar commented 2 years ago

Hi! Please help me. Redmine 3.4.2. Ubuntu 20.04

I have problem with ''mimemagic''.

[!] There was an error parsing `Gemfile`:
[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: mimemagic (>= 0) and mimemagic (~> 0.3.8). Bundler cannot continue.

 #  from /var/www/redmine/plugins/redmine_more_previews/Gemfile:6
 #  -------------------------------------------
 #
 >  gem 'mimemagic', '~> 0.3.8'
 #  -------------------------------------------
. Bundler cannot continue.

 #  from /var/www/redmine/Gemfile:115
 #  -------------------------------------------
 #  Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
 >    eval_gemfile file
 #  end
 #  -------------------------------------------

I used version:

  1. mimemagic-0.3.8
  2. mimemagic-0.3.10
  3. mimemagic-0.4.3
HugoHasenbein commented 2 years ago

you may try to completely remove /var/www/redmine/plugins/redmine_more_previews/Gemfile:6 as current versions of Redmine already load the gem

Am 16.02.2022 um 09:53 schrieb Aratilar @.***>:

Hi! Please help me. Redmine 3.4.2. Ubuntu 20.04

I have problem with ''mimemagic''.

[!] There was an error parsing Gemfile: [!] There was an error parsing Gemfile: You cannot specify the same gem twice with different version requirements. You specified: mimemagic (>= 0) and mimemagic (~> 0.3.8). Bundler cannot continue.

from /var/www/redmine/plugins/redmine_more_previews/Gemfile:6

-------------------------------------------

#

gem 'mimemagic', '~> 0.3.8'

-------------------------------------------

. Bundler cannot continue.

from /var/www/redmine/Gemfile:115

-------------------------------------------

Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", FILE) do |file|

eval_gemfile file

end

-------------------------------------------

I used version:

mimemagic-0.3.8 mimemagic-0.3.10 mimemagic-0.4.3 — Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/33#issuecomment-1041255167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGCTDNGGYKEUOSCNKDU3NQXDANCNFSM5FRTW2YA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.