extended_bundler-errors 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef86ec43e8663245ff3b5235c78b3b196f5adf0e24d50e51bf213b2ce5c89a2a
4
- data.tar.gz: 37c869234b9ffac8082fed75e6281c8b7a4958e06281001a22fdf454f1370593
3
+ metadata.gz: ea6c77d51ab412c899e36249d18e3c572354ff148aab8b23b0254a4a2d4312c0
4
+ data.tar.gz: 8ccfbfa5303d43996d9bdae9c112c7a8d77035bc92f7a6973f8fa0e856d1f25b
5
5
  SHA512:
6
- metadata.gz: 3e117c4d6356d1841f11a13968fb94b815a3b05722ba1382b1f480fb1f360e02f550217749a9f0a485b66d81b28eb0da766d244541638f0d33d2039dc1479511
7
- data.tar.gz: 40c7ce2b56bfd46f558fdfa60c613f60fefb3dd0c574b823158b266630a7426b6858881a4d90f274ddc530dc4e6306908fef2dd11db36d5f9492ca8d3645d8bb
6
+ metadata.gz: 659ba7ff72b6478b1ca283b6c4772fc69f93561857c1d91baca6bbc452b0ed74eb9f42169537bd515c1f0f12617234a335f8f03af3c543a83928239ff58bd97d
7
+ data.tar.gz: 270456e67a833e629e2d743f87cd63b521cc0804abda7e3781b347cb44b19b5a92caefcc8b5337e7b6ddd15080ee90abde725ded8480e87ec668ab96c595211c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- extended_bundler-errors (0.2.1)
4
+ extended_bundler-errors (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = "Extended Errors for Bundler"
13
13
  spec.description = "Extended Errors for Bundler"
14
- spec.homepage = "http://github.com/shopify/extended_bundler-errors"
14
+ spec.homepage = ExtendedBundler::Errors::HOMEPAGE
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -1,5 +1,6 @@
1
1
  module ExtendedBundler
2
2
  module Errors
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
+ HOMEPAGE = "http://github.com/shopify/extended_bundler-errors"
4
5
  end
5
6
  end
@@ -8,6 +8,17 @@ require "yaml"
8
8
 
9
9
  module ExtendedBundler
10
10
  module Errors
11
+ NATIVE_EXTENSION_MSG = ExtendedBundler::Errors::Formatter.new(<<-EOF).format
12
+ #{'=' * 20}
13
+ We weren't able to handle this error, but we noticed it is an issue with {{bold:native extensions}}.
14
+ It is recommended to:
15
+
16
+ 1. Find a string in the output that looks like it could be unique to this failure
17
+ 2. Search Google to try and find a solution
18
+ 3. Make an issue on {{underline:#{ExtendedBundler::Errors::HOMEPAGE}}}
19
+ with the output and any solutions you found
20
+ EOF
21
+
11
22
  class << self
12
23
  # Registers the plugin and adds all needed hooks
13
24
  # Will call troubleshoot via the `after-install` hook if the install does not succeed
@@ -35,11 +46,18 @@ module ExtendedBundler
35
46
  def troubleshoot(spec_install)
36
47
  path = handler_path(spec_install.name)
37
48
  return nil unless File.exist?(path)
49
+
50
+ troubleshooted = false
38
51
  yaml = YAML.load_file(path)
39
52
  yaml.each do |handler|
40
53
  next unless version_match?(spec_install.spec.version, handler['versions'])
41
54
  next unless handler['matching'].any? { |m| spec_install.error =~ Regexp.new(m) }
42
55
  spec_install.error = build_error(spec_install, handler)
56
+ troubleshooted
57
+ end
58
+
59
+ if !troubleshooted && spec_install.error.include?('Failed to build gem native extension')
60
+ spec_install.error = spec_install.error + "\n\n" + NATIVE_EXTENSION_MSG
43
61
  end
44
62
  end
45
63
 
@@ -0,0 +1,29 @@
1
+ -
2
+ versions: all
3
+ matching:
4
+ - unable to fetch v8 source
5
+ messages:
6
+ en: |
7
+ {{bold:What is the problem?}}
8
+ This is probably caused by compilation issues with native C extensions and Ruby.
9
+
10
+ {{bold:What can I do?}}
11
+ You may need to remove Ruby, Gems, and all Bundler caches.
12
+
13
+ 1. Run {{command:ruby -v}} to see what version of Ruby you are running.
14
+ - You might see something like {{italic:ruby -v ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin17]}}
15
+ 2. The {{info:x86_64-darwin17}} part of this means that Ruby was built for darwin17 (Mac OS High Sierra).
16
+ - If you are running a different operating system than the one specified (if one is specified),
17
+ then you will need to remove your Ruby installation, gems (~/.gem), and bundle (~/.bundle)
18
+ and reinstall everything
19
+ - Remove everything with {{command:rm -rf ~/.gem ~/.bundle}} and deleting your Ruby installation
20
+ - {{command:rm -rf /opt/rubies}} if you installed using chruby
21
+ - {{command:rvm uninstall <version>}} if you used RVM
22
+ - {{command:rbenv uninstall <version>}} if you used Rbenv
23
+
24
+ {{bold:Additional steps you can try}}
25
+ Mac:
26
+ Try running:
27
+ {{command:brew install v8}}
28
+ {{command:bundle config build.libv8 --with-system-v8}}
29
+ {{command:bundle install}}
@@ -0,0 +1,24 @@
1
+ -
2
+ versions: all
3
+ matching:
4
+ - cannot load such file -- mkmf
5
+ - sqlite3 is missing
6
+ messages:
7
+ en: |
8
+ {{bold:What is the problem?}}
9
+ You are missing the SQLite binaries required to install the gem.
10
+
11
+ {{bold:What can I do?}}
12
+ Mac: One of these might help:
13
+ - {{command:brew install sqlite}}
14
+ - {{command:brew install ruby-dev}}
15
+
16
+ Linux: One of these might help:
17
+ APT:
18
+ - {{command:sudo apt-get install ruby-dev}}
19
+ - {{command:sudo apt-get install libsqlite3-dev}}
20
+ - {{command:sudo apt-get install make}}
21
+
22
+ YUM:
23
+ - {{command:yum install sqlite3-devel}}
24
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extended_bundler-errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jules2689
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2018-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,8 +75,10 @@ files:
75
75
  - lib/extended_bundler/errors/formatter.rb
76
76
  - lib/extended_bundler/errors/version.rb
77
77
  - lib/extended_bundler/handlers/http_parser.yml
78
+ - lib/extended_bundler/handlers/libv8.yml
78
79
  - lib/extended_bundler/handlers/mysql2.yml
79
80
  - lib/extended_bundler/handlers/rmagick.yml
81
+ - lib/extended_bundler/handlers/sqlite3.yml
80
82
  - lib/extended_bundler/handlers/testing_stuff.yml
81
83
  - lib/extended_bundler/handlers/testing_stuff_2.yml
82
84
  - lib/extended_bundler/handlers/unf_ext.yml