Skip to content

Commit

Permalink
Fix Travis mime-types dependency issue
Browse files Browse the repository at this point in the history
Before this fix some of our Travis builds failed with:

    Gem::InstallError: mime-types-data requires Ruby version >= 2.0.

Idea for the fix was found here:
sgruhier/foundation_rails_helper#116
Although we could not use the same method as I only want to lock
down the version of mime-type where necessary. Also trying to lock
the version to 2.6.2 would break our Rails-3.2 Appraisal path.
  • Loading branch information
gerrywastaken committed May 6, 2016
1 parent 7234e44 commit 0e34116
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@ end

appraise 'rails-4.0' do
gem 'rails', '~> 4.0.0'

# The last version that doesn't need Ruby 2.0 and works with version 4.0 of
# Rails. This addresses a build problem with Travis for version 1.9.3 of Ruby
gem 'mime-types', '2.6.2', :platforms => :ruby_19
end

appraise 'rails-4.1' do
gem 'rails', '~> 4.1.0'

# The last version that doesn't need Ruby 2.0 and works with version 4.1 of
# Rails. This addresses a build problem with Travis for version 1.9.3 of Ruby
gem 'mime-types', '2.6.2', :platforms => :ruby_19
end

appraise 'rails-4.2' do
gem 'rails', '~> 4.2.0'

# The last version that doesn't need Ruby 2.0 and works with version 4.2 of
# Rails. This addresses a build problem with Travis for version 1.9.3 of Ruby
gem 'mime-types', '2.6.2', :platforms => :ruby_19
end

appraise 'mongoid-3.0' do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_4.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
source "https://rubygems.org"

gem "rails", "~> 4.0.0"
gem "mime-types", "2.6.2", :platforms => :ruby_19

gemspec :path => "../"
1 change: 1 addition & 0 deletions gemfiles/rails_4.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
source "https://rubygems.org"

gem "rails", "~> 4.1.0"
gem "mime-types", "2.6.2", :platforms => :ruby_19

gemspec :path => "../"
1 change: 1 addition & 0 deletions gemfiles/rails_4.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
source "https://rubygems.org"

gem "rails", "~> 4.2.0"
gem "mime-types", "2.6.2", :platforms => :ruby_19

gemspec :path => "../"

0 comments on commit 0e34116

Please sign in to comment.