Skip to content

Commit

Permalink
Merge pull request #1417 from ClimateWatch-Vizzuality/upgrade-mimemagic
Browse files Browse the repository at this point in the history
Upgrade mimemagic
  • Loading branch information
Bluesmile82 authored Mar 26, 2021
2 parents 68f40a0 + 4b1e85e commit d84460d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ENV USER_REPORT_KEY $USER_REPORT_KEY
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client nodejs build-essential patch zlib1g-dev liblzma-dev libicu-dev
postgresql-client nodejs build-essential patch zlib1g-dev liblzma-dev libicu-dev shared-mime-info
RUN npm install -g yarn

# Create app directory
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ gem 'sidekiq', '>= 6.1.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'appsignal'

# 0.3.5 won't work anymore
# https://github.com/rails/rails/issues/41750
gem "mimemagic", '0.3.8'

group :development, :test do
gem 'dotenv-rails'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,15 @@ GEM
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (1.0.0)
mimemagic (0.3.5)
mimemagic (0.3.8)
nokogiri (~> 1)
mini_mime (1.0.2)
mini_portile2 (2.5.0)
minitest (5.14.4)
msgpack (1.2.4)
multipart-post (2.0.0)
nio4r (2.5.7)
nokogiri (1.11.1)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
oj (3.6.8)
Expand Down Expand Up @@ -431,6 +432,7 @@ DEPENDENCIES
json-schema
kaminari
listen (>= 3.0.5, < 3.2)
mimemagic (= 0.3.8)
oj
pg (~> 0.20)
pg_search
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ yarn run rails:install

These will satisfy both the frontend and backend's dependency requirements.

You will probably need to install shared-mime-info in your system:
https://github.com/rails/rails/issues/41757

(mac)
```
brew install shared-mime-info
```

(linux)
```
sudo apt-get install shared-mime-info
```

#### Setting up the Rails environment

Copy the sample `.env.sample` file to `.env` and modify it as needed to fit the
Expand Down

0 comments on commit d84460d

Please sign in to comment.