You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An error occurred while installing mimemagic (0.3.10), and Bundler cannot continue. #162
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:
rails was resolved to 6.1.3, which depends on
actionmailbox was resolved to 6.1.3, which depends on
activestorage was resolved to 6.1.3, which depends on
marcel was resolved to 0.3.3, which depends on
mimemagic
Anybody seeing this issue ?
Can you help me fix this.
This issue is occurring after I installed ruby 3.0.1 via rvm
Reacted by Pavel Kalashnikov, Sajjad Umar and Suleyman Musayev
Perhaps I was wrong, sorry my first day in a mac environment, I just do brew install shared-mime-info and again try to install with gem install mimemagic -v '0.3.10' --source 'https://rubygems.org/', then it just run fine.
log for reference.
`current directory: /Users/rasalghul/.gem/gems/mimemagic-0.4.3/ext/mimemagic
/Users/rasalghul/.rbenv/versions/2.6.5/bin/ruby -rrubygems /Users/rasalghul/.gem/gems/rake-13.0.3/exe/rake RUBYARCHDIR=/Users/rasalghul/.gem/extensions/-darwin-20/2.6.0/mimemagic-0.4.3 RUBYLIBDIR=/Users/rasalghul/.gem/extensions/-darwin-20/2.6.0/mimemagic-0.4.3
Ignoring nio4r-2.5.7 because its extensions are not built. Try: gem pristine nio4r --version 2.5.7
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.
/Users/rasalghul/.gem/gems/mimemagic-0.4.3/ext/mimemagic/Rakefile:15:in locate_mime_database' /Users/rasalghul/.gem/gems/mimemagic-0.4.3/ext/mimemagic/Rakefile:26:in block in <top (required)>'
/Users/rasalghul/.gem/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`
Reacted by Pagorn Phusaisakul, Sharat Naik, Akila Munasinghe, João Alves, Anup Singh, Ethan Dowler, Rinold Simon , bjh, Faizan Malik, Andrew Owino and 28 more
Reacted by whchi and Amutha raj s
Reacted by Pagorn Phusaisakul, Akila Munasinghe, João Alves and John Barbosa
Reacted by febincloudyuga, Kishor Prins, Alex Szabo, Eneko Alonso, Baleria Reyes, Asad Hameed, Tristan / T4T5, kaushal_yadav, Tsai, Alaa and 11 more
Reacted by anupamkakade, Ulysse Dansin, Asad Hameed, Pagorn Phusaisakul, Sharat Naik, Akila Munasinghe, João Alves, hiep2fooder, Jorge Modesto, John Barbosa and 3 more
Reacted by Pagorn Phusaisakul, Yerko Henriquez, Álvaro Cuesta, Akila Munasinghe, João Alves, Santiago Alaniz, hiep2fooder, John Barbosa, JamJacques, samsrose and 1 more
UPD: issue disappeared when I unset bundle path to vendor/bundle.
Same here. Ruby 3.0.1 (via rvm), Linux, Ubuntu 20.04.2 LTS. shared-mime-info is installed.
...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/user/work/myproj/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.3.10/ext/mimemagic
/home/user/.rvm/rubies/ruby-3.0.1/bin/ruby -I/home/user/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0
-rrubygems /home/user/work/myproj/vendor/bundle/ruby/3.0.0/gems/rake-12.3.3/exe/rake
RUBYARCHDIR\=/home/user/work/myproj/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mimemagic-0.3.10
RUBYLIBDIR\=/home/user/work/myproj/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mimemagic-0.3.10
rake aborted!
ArgumentError: wrong number of arguments (given 2, expected 1)
/home/user/work/myproj/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.3.10/ext/mimemagic/Rakefile:43:in
`block in <top (required)>'
/home/user/work/myproj/vendor/bundle/ruby/3.0.0/gems/rake-12.3.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
/home/user/work/myproj/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.3.10 for inspection.
Results logged to
/home/user/work/myproj/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.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'` succeeds before bundling.
When I ran bundle with the --path argument, I got the following error:
$ bundle install --path=vendor/bundle
...
Installing mimemagic 0.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: $DIR/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.3.10/ext/mimemagic
$HOME/.rbenv/versions/3.0.0/bin/ruby -I$HOME/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -rrubygems $DIR/vendor/bundle/ruby/3.0.0/gems/rake-12.3.3/exe/rake
RUBYARCHDIR\=$DIR/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mimemagic-0.3.10 RUBYLIBDIR\=$DIR/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mimemagic-0.3.10
rake aborted!
ArgumentError: wrong number of arguments (given 2, expected 1)
$DIR/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.3.10/ext/mimemagic/Rakefile:43:in `block in <top (required)>'
$DIR/vendor/bundle/ruby/3.0.0/gems/rake-12.3.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 $DIR/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.3.10 for inspection.
Results logged to $DIR/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.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:
rails was resolved to 6.1.0, which depends on
actionmailbox was resolved to 6.1.0, which depends on
activestorage was resolved to 6.1.0, which depends on
marcel was resolved to 0.3.3, which depends on
mimemagic
Removing the rake ~> 12.3 restriction upgraded it to 13 and it worked after that.
Reacted by Nathan Warfield, doakes23, Vu Vo, Javier Menéndez Rizo and Martin Meys
I ran brew install shared-mime-info but mimemagic still couldn't find it because Homebrew installed it in a different place to what was expected. I had to run:
Reacted by nitin-kr-mandilwar, Myat Su Phyo, Uduak Essien, Yaro Shm, Marcos Braga de Alencar Santos, Ravindra Singh, Wendel Chinsamy, Chris Dolinski, Habip Yeşilyurt, jcgil and 13 more
Reacted by Wendel Chinsamy, Chris Dolinski and victorp11
Reacted by Caleb Hyde and Chris Dolinski
Reacted by Wendel Chinsamy, Chris Dolinski and Andy Ruiz Garramones
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.
So, as an alternative to the previous comment here, you can export FREEDESKTOP_MIME_TYPES_PATH=$(brew --prefix)/Cellar/shared-mime-info/2.1/share/shared-mime-info/packages/freedesktop.org.xml
I had the same issue, I have the following in my project:
Ruby 2.7.1
Rails 6.0.4
MacBook Pro Apple M3 with macOs Sonoma 14.3
I fixed with brew install shared-mime-info and then bundle install
Reacted by Sarah Austin, Carlos Martinez, Guillaume Occuly, Alejandro Cen, Caio Agiani, victorp11, david, Angel Huezo and Preet Bhatia
Reacted by Alex Vaos, Jose Martinez, Ezequiel Maraschio, Sarah Austin, mpattan4, Ricardo Trejos, Carlos Martinez, Alejandro Cen, Caio Agiani, victorp11 and 3 more
Activity
jgengo commentedon May 3, 2021
@anupamkakade Do you have more logs below or it's all you received?!
carlosgomez2 commentedon May 5, 2021
Same problem here, seems to be related to Apple M1 chipset, doing:
$ gem install mimemagic -v '0.3.10' --source 'https://rubygems.org/'
ERROR: Error installing mimemagic:
ERROR: Failed to build gem native extension.
...
checking host system type... Invalid configuration
arm64-apple-darwin20': machinearm64-apple' not recognizedconfigure: error: /bin/sh ./config.sub arm64-apple-darwin20 failed
carlosgomez2 commentedon May 5, 2021
Perhaps I was wrong, sorry my first day in a mac environment, I just do
brew install shared-mime-infoand again try to install withgem install mimemagic -v '0.3.10' --source 'https://rubygems.org/', then it just run fine.log for reference.
`current directory: /Users/rasalghul/.gem/gems/mimemagic-0.4.3/ext/mimemagic
/Users/rasalghul/.rbenv/versions/2.6.5/bin/ruby -rrubygems /Users/rasalghul/.gem/gems/rake-13.0.3/exe/rake RUBYARCHDIR=/Users/rasalghul/.gem/extensions/-darwin-20/2.6.0/mimemagic-0.4.3 RUBYLIBDIR=/Users/rasalghul/.gem/extensions/-darwin-20/2.6.0/mimemagic-0.4.3
Ignoring nio4r-2.5.7 because its extensions are not built. Try: gem pristine nio4r --version 2.5.7
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.
/Users/rasalghul/.gem/gems/mimemagic-0.4.3/ext/mimemagic/Rakefile:15:in
locate_mime_database' /Users/rasalghul/.gem/gems/mimemagic-0.4.3/ext/mimemagic/Rakefile:26:inblock in <top (required)>'/Users/rasalghul/.gem/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`
yevhene commentedon May 13, 2021
UPD: issue disappeared when I unset bundle path to
vendor/bundle.Same here. Ruby 3.0.1 (via rvm), Linux, Ubuntu 20.04.2 LTS.
shared-mime-infois installed.atsheehan commentedon Jun 3, 2021
I ran into this issue as well and was able to resolve it by upgrading
raketo v13.I could reproduce the issue with the following Gemfile:
When I ran bundle with the
--pathargument, I got the following error:Removing the
rake ~> 12.3restriction upgraded it to 13 and it worked after that.ChrisBAshton commentedon Mar 25, 2022
I ran
brew install shared-mime-infobut mimemagic still couldn't find it because Homebrew installed it in a different place to what was expected. I had to run:Then the
bundle installworked 👍clebio commentedon Apr 19, 2022
The trace shows
So, as an alternative to the previous comment here, you can
export FREEDESKTOP_MIME_TYPES_PATH=$(brew --prefix)/Cellar/shared-mime-info/2.1/share/shared-mime-info/packages/freedesktop.org.xmlloqman commentedon Oct 23, 2023
Ruby 3.2.2
Rails 6.1.7.6
Downgraded
mimemagicto0.3.8and the issue was fixed.baston1 commentedon Feb 6, 2024
I had the same issue, I have the following in my project:
I fixed with
brew install shared-mime-infoand thenbundle installscaustin34 commentedon Apr 8, 2024
This worked for me with Ruby 2.6.3, Rails 5.2.4, M3 14.4.1
Update Rake