我很高兴使用ruby 1.9.2-p180使用ActionMailer从我的网络应用程序发送电子邮件.然后我使用RVM升级到ruby 1.9.3-p125.
现在,每次尝试发送和发送电子邮件时,我都会遇到分段错误.
/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/smtp.rb:583: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin10.8.0]
-- Control frame information -----------------------------------------------
c:0092 p:---- s:0499 b:0499 l:000498 d:000498 CFUNC :connect
c:0091 p:0059 s:0496 b:0496 l:000495 d:000495 METHOD /Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/smtp.rb:583
c:0090 p:0255 s:0491 b:0490 l:001180 d:001180 METHOD /Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/smtp.rb:560
c:0089 p:0047 s:0482 b:0482 l:000481 d:000481 METHOD /Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/smtp.rb:519
c:0088 p:0496 s:0475 b:0475 l:000474 d:000474 METHOD /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/mail-2.3.0/lib/mail/network/delivery_methods/smtp.rb:128
c:0087 p:0031 s:0464 b:0464 l:000463 d:000463 METHOD /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/mail-2.3.0/lib/mail/message.rb:1989
c:0086 p:0009 s:0460 b:0460 l:000436 d:000459 BLOCK /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/mail-2.3.0/lib/mail/message.rb:230
c:0085 p:0021 s:0458 b:0458 l:000440 …Run Code Online (Sandbox Code Playgroud) 我在10.8.3 OSX系统上安装了rvm,虽然它似乎已正确安装但没有安装红宝石.我跑了rvm install,似乎什么也没发生.
$ rvm install ruby-2.0.0-p0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
Certificates in '/Users/disaacs/.rvm/etc/openssl/cert.pem' already are up to date.
$ rvm list
rvm rubies
# No rvm rubies installed yet. Try 'rvm help install'.
Run Code Online (Sandbox Code Playgroud)
我也尝试过sudo rvm install,但这没有任何区别.
关于我失踪的任何想法?
编辑:rvm requirements …
我在OSX上使用Devise 2.0.0和Rails 3.2.3.
是否可以同时覆盖Devise控制器和Devise视图?
我成功地使用我自己的作用域视图覆盖了确认/新视图views/users/confirmations/new.html.erb.范围的视图工作正常.
然后我发现有必要Devise::ConfirmationsController使用我自己的控制器覆盖AppConfirmationsController,以便自定义after_confirmation_path_for方法以返回我自己的自定义路径.
class AppConfirmationsController < Devise::ConfirmationsController
protected
def after_confirmation_path_for(resource_name, resource)
confirmed_app_custom_path
end
end
Run Code Online (Sandbox Code Playgroud)
我改变了路线,以便使用我的自定义控制器
devise_for :users, :controllers => {:confirmations => 'app_confirmations'}
Run Code Online (Sandbox Code Playgroud)
新的控制器工作正常,但我的范围视图不再被识别.而不是渲染我的范围视图,正在呈现设计默认视图.如果我停止使用自定义控制器,我的范围视图将再次开始工作.
我在使用客户控制器时是否缺少影响范围视图的配置设置?
我最近偶然发现 OSX 上 Chrome 的奇怪行为。加载某个页面时,我会将一个新页面推送到窗口历史记录中,这样如果用户单击后退按钮,就会加载新页面,而不是他们刚刚来自的页面。
我正在使用replaceState和pushState来修改历史记录,并设置onpopstate处理程序以在单击后退按钮时加载新页面。
然而,在 Chrome 中,这不起作用,除非用户在单击后退按钮之前单击页面上的任意位置(或按任意键)。
我似乎无法在小提琴上演示这个,但是如果您设置以下内容,您应该能够重现该行为
page1.html
<html>
<body>
<h1>This is page 1</h1>
<a href="page3.html">Go to page 3</a>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
page2.html
<html>
<body>
<h1>This is page 2</h1>
<p>Well, how did you get here?</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
page3.html
<html>
<body>
<h1>This is page 3</h1>
<p>Why don't you go back to page 1?</p>
<script>
history.replaceState(null, '', 'page2.html');
history.pushState(null, '', 'page3.html');
window.onpopstate = function(event) {
console.log("Reloading page in onpopstate handler");
window.location = …Run Code Online (Sandbox Code Playgroud)