Skip to content

Commit a09245d

Browse files
yujinakayamaSam Phippen
authored andcommitted
Use the same version of nokogiri in example app
... to fix the installation problem on Travis CI.
1 parent 724109d commit a09245d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ gem 'rack-cache', '< 1.3.0' if RUBY_VERSION < '2.0.0'
2929

3030
if RUBY_VERSION < '1.9.2'
3131
gem 'nokogiri', '~> 1.5.0'
32+
elsif RUBY_VERSION < '1.9.3'
33+
gem 'nokogiri', '1.5.2'
34+
else
35+
gem 'nokogiri', '1.6.7.1'
3236
end
3337

3438
if RUBY_VERSION <= '1.8.7'

example_app_generator/generate_app.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'nokogiri/version'
2+
13
rspec_rails_repo_path = File.expand_path("../../", __FILE__)
24
rspec_dependencies_gemfile = File.join(rspec_rails_repo_path, 'Gemfile-rspec-dependencies')
35
rails_dependencies_gemfile = File.join(rspec_rails_repo_path, 'Gemfile-rails-dependencies')
@@ -15,6 +17,10 @@
1517
# edge branches
1618
gsub_file 'Gemfile', /^.*\bgem 'rails.*$/, ''
1719

20+
# Nokogiri version is pinned in rspec-rails' Gemfile since it tend to cause installation problems
21+
# on Travis CI, so we pin nokogiri in this example app also.
22+
append_to_file 'Gemfile', "gem 'nokogiri', '#{Nokogiri::VERSION}'\n"
23+
1824
# Use our version of RSpec and Rails
1925
append_to_file 'Gemfile', <<-EOT.gsub(/^ +\|/, '')
2026
|# Rack::Cache 1.3.0 requires Ruby >= 2.0.0

0 commit comments

Comments
 (0)