Skip to content

Commit 17959a7

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 17959a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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)