-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenssl-certicate-verify-failed.html
133 lines (131 loc) · 8.04 KB
/
openssl-certicate-verify-failed.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Ruby OpenSSL Certificate Verify Failed</title>
<link href="https://plus.google.com/u/0/b/117374718581973393536/117374718581973393536/posts/" rel="publisher" />
<link rel="stylesheet" href="/css/screen.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="/css/gollum.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="/css/syntax.css" type="text/css" charset="utf-8" />
<script src="http://code.jquery.com/jquery-1.6.min.js" type="text/javascript"></script>
<script src="/javascript/jquery.text_selection-1.0.0.min.js" type="text/javascript"></script>
<script src="/javascript/jquery.previewable_comment_form.js" type="text/javascript"></script>
<script src="/javascript/jquery.tabs.js" type="text/javascript"></script>
<script src="/javascript/gollum.js" type="text/javascript"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5109366-14']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="main">
<div class="site">
<div id="guides">
<div class="guide">
<div class="main">
<div class="actions">
<a href="http://railsapps.github.com/"><img src="http://railsapps.github.com/images/rails-36x36.jpg" title="Home" alt="Home"></a>
<a href="http://railsapps.github.com/">Rails Apps</a>
<a href="https://github.com/RailsApps">GitHub Repository</a>
</div><!-- class="actions" -->
<h1>Ruby OpenSSL Certificate Verify Failed</h1>
<div class="content wikistyle gollum textile">
<h1>Ruby OpenSSL Certificate Verify Failed</h1>
<p>This is a note for developers using the starter apps from the <a href="http://railsapps.github.com/">Rails Apps</a> repository. Others may find it helpful as well.</p>
<h2>Error</h2>
<p>You may received an error message if you’ve tried to create a new Rails application using an application template hosted on GitHub.</p>
<p>For example, you may have entered</p>
<pre>
$ rails new myapp -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-devise-template.rb -T -O
</pre>
<p>and seen the following error message:</p>
<pre>
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
</pre>
<p>The Ruby language interpreter uses OpenSSL to connect to GitHub to request an application template file. GitHub requires all connections to be made using <span class="caps">SSL</span>. The connection failed because OpenSSL was unable to verify the server certificate.</p>
<p>This can happen when the certificate file on your computer is out of date, missing, or can’t be found.</p>
<h2>Solution for Mac OS 10.6.8</h2>
<p>Download a certificate file:</p>
<pre>
$ cd /opt/local/etc/openssl
$ sudo curl -O http://curl.haxx.se/ca/cacert.pem
$ sudo mv cacert.pem cert.pem
</pre>
<p>
<em>Doesn’t work for you? Please add to the comments below.</em>
</p>
<h2>Solution for Windows</h2>
<p>You can try the hack offered here: <a href="http://blog.dominicsayers.com/2011/08/16/howto-use-a-rails-template-from-github-on-windows/">How to Use an Application Template from Github when You’re Developing in Rails on Windows</a></p>
<p>
<em>Any advice to offer? Please add to the comments below.</em>
</p>
<h2>Solution for Ubuntu</h2>
<p><span class="caps">RVM</span> users :</p>
<p>If you have compiled your ruby version with the openssl package version</p>
<pre>$ rvm pkg install openssl
$rvm install 1.9.2 --with-openssl-dir=$rvm_path/usr
</pre>
<p>You have to link certs directory with /etc/ssl/certs</p>
<pre>$ rmdir $rvm_path/usr/ssl/certs
$ ln -s /etc/ssl/certs $rvm_path/usr/ssl
</pre>
<p>
<em>Any advice to offer? Please add to the comments below.</em>
</p>
</div><!-- class="content" -->
<div class="comments">
<div class="content wikistyle gollum">
<h2>Comments</h2>
</div>
<p>Is this helpful? Please "like" below. Question or suggestion? Please add a comment below. Got a correction or addition? You can edit this page <a href="https://github.com/railsapps/railsapps.github.com/wiki/_pages">on the wiki</a> or create a <a href="https://github.com/RailsApps/railsapps.github.com/issues">GitHub issue</a> to alert me.</p>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'railsapps'; // required: replace example with your forum shortname
// The following are highly recommended additional parameters.
// var disqus_identifier = 'openssl-certicate-verify-failed.html';
// var disqus_url = 'http://railsapps.github.com/openssl-certicate-verify-failed.html';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div><!-- class="comments" -->
<br />
<br />
<div class="credits">
<div class="content wikistyle gollum">
<h2>Credits</h2>
</div>
<p>Daniel Kehoe (<a href="http://danielkehoe.com/">http://danielkehoe.com/</a>) initiated the project and wrote some examples and tutorials.</p>
<p>Your contributions are welcome!</p>
</div><!-- class="credits" -->
<div class="admin">
<small>Corrections? Additions? You can edit this page <a href="https://github.com/railsapps/railsapps.github.com/wiki/_pages">on the wiki</a>.</small>
<div style="float: right;">
<small>Last edited by <b>hallelujah</b>, 2012-01-30 08:33:48</small>
</div>
</div><!-- class="admin" -->
</div><!-- class="main" -->
</div><!-- class="guide" -->
</div><!-- id="guides" -->
</div><!-- class="site" -->
</div><!-- id="main" -->
<!-- MixPanel analytics -->
<script type='text/javascript'> var mp_protocol = (('https:' == document.location.protocol) ? 'https://' : 'http://'); document.write(unescape('%3Cscript src="' + mp_protocol + 'api.mixpanel.com/site_media/js/api/mixpanel.js" type="text/javascript"%3E%3C/script%3E')); </script> <script type='text/javascript'> try { var mpmetrics = new MixpanelLib('b1cf97418f8c5b129847e8a52edbae68'); } catch(err) { null_fn = function () {}; var mpmetrics = { track: null_fn, track_funnel: null_fn, register: null_fn, register_once: null_fn, register_funnel: null_fn }; } </script>
<!-- Clicky analytics -->
<script src="//static.getclicky.com/js" type="text/javascript"></script>
<script type="text/javascript">try{ clicky.init(66423523); }catch(e){}</script>
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/66423523ns.gif" /></p></noscript>
</body>
</html>