summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md9
-rw-r--r--ISSUES.md36
-rwxr-xr-xbin/bundle3
-rw-r--r--lib/bundler/fetcher.rb14
-rw-r--r--lib/bundler/friendly_errors.rb8
-rw-r--r--lib/bundler/installer.rb1
-rw-r--r--lib/bundler/vendored_persistent.rb3
-rw-r--r--lib/bundler/vendored_thor.rb3
-rw-r--r--spec/install/gems/dependency_api_spec.rb34
9 files changed, 82 insertions, 29 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ee5bca998..f3d254ade6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,15 @@ Documentation:
- Add basic documentation for bin_path and bundle_path (@radar)
- Add documentation for the run method in Bundler::Installer
+## 1.1.4 (May 27, 2012)
+
+Bugfixes:
+
+ - Use `latest_release` in Capistrano and Vlad integration (#1264)
+ - Unknown exceptions now link to ISSUES for help instead of a new ticket
+ - When OpenSSL is missing, provide instructions for fixing (#1776 etc.)
+ - Correct inline help for `clean --force` (@dougbarth, #1911)
+ - Work around a Ruby 1.9.3p194 bug in Psych when config files are empty
## 1.1.3 (March 23, 2012)
diff --git a/ISSUES.md b/ISSUES.md
index 3c2a6536c0..192c720382 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -1,11 +1,21 @@
# Bundler Issues
-## Troubleshooting
+So! You're having problems with Bundler. This file is here to help. If you're running into an error, try reading the rest of this file for help. If you can't figure out how to solve your problem, there are also instructions on how to report a bug.
+
+## Documentation
-Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).
+Instructions for common Bundler uses can be found on the [Bundler documentation site](http://gembundler.com/v1.1/).
Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).
+## Troubleshooting
+
+### Heroku errors
+
+Please open a ticket with Heroku if you're having trouble deploying. They have a professional support team who can help you resolve Heroku issues far better than the Bundler team can. If the problem that you are having turns out to be a bug in Bundler itself, Heroku support can get the exact details to us.
+
+### Something else
+
After reading the documentation, try these troubleshooting steps:
# remove user-specific gems and git repos
@@ -26,24 +36,9 @@ After reading the documentation, try these troubleshooting steps:
# try to install one more time
bundle install
-## Frequently encountered issues
-
-### Heroku errors
-
-Open a ticket with Heroku. If the issue somehow turns out to be with Bundler itself, the Heroku support team will forward the details of your issue to us.
-
-### REE and Zlib::GzipFile::Error
-
-Ruby Enterprise Edition users may see a `Zlib::GzipFile::Error` while installing gems. It is due to [a bug in REE](http://code.google.com/p/rubyenterpriseedition/issues/detail?id=45). You may be able to resolve the issue by upgrading REE, or changing to a different interpreter.
-
-### Rake activation error
-
-Anyone who has installed the Spork gem may see activation errors while running `rake` directly. This is because old versions of Spork would [install the newest rake using a mkmf file](https://github.com/timcharper/spork/issues/119). To resolve the issue, update the Spork version requirement in your Gemfile to at least `"~>0.8.5"` or `"~>0.9.0.rc8"`.
-
-
## Reporting unresolved problems
-Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:
+The Bundler team needs to know some things in order to diagnose and hopefully fix the bug you've found. When you report a bug, please include the following information:
- The command you ran
- Exception backtrace(s), if any
@@ -57,11 +52,12 @@ Instructions that allow the Bundler team to reproduce your issue are vitally imp
- Whether you have the `rubygems-bundler` gem, which can break gem binares
- Whether you have the `open_gem` gem, which can cause rake activation conflicts
-
If you are using Rails 2.3, please also include:
- Your boot.rb file
- Your preinitializer.rb file
- Your environment.rb file
-[Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler) and create a new ticket describing your problem and linking to your gist.
+[Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler/issues) and [create a new ticket](https://github.com/carlhuda/bundler/issues/new) describing your problem and linking to your gist.
+
+Thanks for reporting issues and making Bundler better! \ No newline at end of file
diff --git a/bin/bundle b/bin/bundle
index 323fe795d2..53997cf2f4 100755
--- a/bin/bundle
+++ b/bin/bundle
@@ -8,6 +8,7 @@ $:.each do |path|
abort(err)
end
end
+
require 'bundler/cli'
require 'bundler/friendly_errors'
-Bundler.with_friendly_errors {Bundler::CLI.start }
+Bundler.with_friendly_errors { Bundler::CLI.start }
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 4f129c4367..9121328419 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -1,5 +1,5 @@
require 'uri'
-require 'net/http/persistent'
+require 'bundler/vendored_persistent'
module Bundler
# Handles all the fetching with the rubygems server
@@ -104,6 +104,16 @@ module Bundler
end
index
+ rescue LoadError => e
+ if e.message.include?("cannot load such file -- openssl")
+ raise InstallError,
+ "\nCould not load OpenSSL." \
+ "\nYou must recompile Ruby with OpenSSL support or change the sources in your" \
+ "\nGemfile from 'https' to 'http'. Instructions for compiling with OpenSSL" \
+ "\nusing RVM are available at rvm.io/packages/openssl."
+ else
+ raise e
+ end
end
# fetch index
@@ -208,7 +218,7 @@ module Bundler
Bundler.ui.debug "Could not fetch prerelease specs from #{strip_user_pass_from_uri(@remote_uri)}"
end
rescue Gem::RemoteFetcher::FetchError
- raise Bundler::HTTPError, "Could not reach #{strip_user_pass_from_uri(@remote_uri)}"
+ raise HTTPError, "Could not reach #{strip_user_pass_from_uri(@remote_uri)}"
end
return spec_list
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 6bff61647a..5cd4e19d26 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -13,11 +13,9 @@ module Bundler
rescue SystemExit => e
exit e.status
rescue Exception => e
- Bundler.ui.error "Unfortunately, a fatal error has occurred. " +
- "Please report this error to the Bundler issue tracker at " +
- "https://github.com/carlhuda/bundler/issues so that we can fix it. " +
- "Please include the full output of the command, your Gemfile and Gemfile.lock. " +
- "Thanks!"
+ Bundler.ui.error(
+ "Unfortunately, a fatal error has occurred. Please see the Bundler \n" \
+ "troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! \n")
raise e
end
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index ece9cdfa1b..a99f0650bf 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -124,6 +124,7 @@ module Bundler
msg = "An error occurred while installing #{spec.name} (#{spec.version}),"
msg << " and Bundler cannot continue.\nMake sure that `gem install"
msg << " #{spec.name} -v '#{spec.version}'` succeeds before bundling."
+ Bundler.ui.debug e.backtrace.join("\n")
raise Bundler::InstallError, msg
end
diff --git a/lib/bundler/vendored_persistent.rb b/lib/bundler/vendored_persistent.rb
new file mode 100644
index 0000000000..bfc69de70e
--- /dev/null
+++ b/lib/bundler/vendored_persistent.rb
@@ -0,0 +1,3 @@
+vendor = File.expand_path('../vendor', __FILE__)
+$:.unshift(vendor) unless $:.include?(vendor)
+require 'net/http/persistent'
diff --git a/lib/bundler/vendored_thor.rb b/lib/bundler/vendored_thor.rb
index bd837ba9e4..a6434268ed 100644
--- a/lib/bundler/vendored_thor.rb
+++ b/lib/bundler/vendored_thor.rb
@@ -2,6 +2,7 @@ if defined?(Thor)
Bundler.ui.warn "Thor has already been required. " +
"This may cause Bundler to malfunction in unexpected ways."
end
-$:.unshift File.expand_path('../vendor', __FILE__)
+vendor = File.expand_path('../vendor', __FILE__)
+$:.unshift(vendor) unless $:.include?(vendor)
require 'thor'
require 'thor/actions'
diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb
index 77b7449a25..1a94917f45 100644
--- a/spec/install/gems/dependency_api_spec.rb
+++ b/spec/install/gems/dependency_api_spec.rb
@@ -399,4 +399,38 @@ OUTPUT
out.should_not include("#{user}:#{password}")
end
end
+
+ context "when ruby is compiled without openssl" do
+ before do
+ # Install a monkeypatch that reproduces the effects of openssl being
+ # missing when the fetcher runs, as happens in real life. The reason
+ # we can't just overwrite openssl.rb is that Artifice uses it.
+ bundled_app("broken_ssl").mkpath
+ bundled_app("broken_ssl/openssl.rb").open("w") do |f|
+ f.write <<-RUBY
+ $:.delete File.expand_path("..", __FILE__)
+ require 'openssl'
+
+ require 'bundler'
+ class Bundler::Fetcher
+ def fetch(*)
+ raise LoadError, "cannot load such file -- openssl"
+ end
+ end
+ RUBY
+ end
+ end
+
+ it "explains what to do to get it" do
+ gemfile <<-G
+ source "#{source_uri.gsub(/http/, 'https')}"
+ gem "rack"
+ G
+
+ bundle :install, :artifice => "endpoint",
+ :env => {"RUBYOPT" => "-I#{bundled_app("broken_ssl")}"}
+ out.should include("Could not load OpenSSL.")
+ end
+ end
+
end