小编Dhe*_*thi的帖子

无法在Rspec中测试辅助方法的渲染功能

我使用的是Rails 2.3.4和Rspec 1.2.0.我试图测试一个尝试渲染页面或部分的助手,我得到一个例外

未定义的方法`render'for

假设,我的助手方法是

def some_helper
 render(:partial => "some/partial", :locals => {:some => some}
end 
Run Code Online (Sandbox Code Playgroud)

并从规范中调用它

it "should render the partial" do
 some_helper.should render_template("some/partial")
end
Run Code Online (Sandbox Code Playgroud)

任何建议都会有用

rspec ruby-on-rails

6
推荐指数
1
解决办法
1592
查看次数

是否有任何宝石可以从png图像中读取exif数据

我正在从iphone上传png图片.我想从图像中读取gps信息.我使用的是EXIF Reader(GitHub),但它只适用于gif和tiff格式.

从png图像中读取Exif数据的任何解决方案都将非常有用

ruby iphone exif

5
推荐指数
1
解决办法
1134
查看次数

Ruby 1.9.2中的AUTH不可用(Net :: SMTPAuthenticationError)

我试图从MS Exchange服务器发送邮件,但我收到错误

`check_auth_response':503#5.3.3 AUTH不可用(Net :: SMTPAuthenticationError)

我用来发送邮件的代码是

require 'net/smtp'
require 'mail'

smtp = Net::SMTP.new('mycompanydomain',25)
smtp.start('mycompanydomain', 'name@company.com', 'pwd',:plain) do |smtp|
  # code to send mail
end
Run Code Online (Sandbox Code Playgroud)

注意:它适用于Gmail帐户,但无法使用公司帐户.任何帮助都会有用.

ruby smtp

5
推荐指数
1
解决办法
4526
查看次数

无法运行示例rhodes应用程序

我安装了Android sdk版本和Andorid ndk.使用Android SDK和AVD Manager,我安装了SDK Plaform Android 2.2,API8,rev3和1.6,API4,revsion3

当我尝试rake run:android我得到错误说

D:/Android_ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-android
eabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: crtbegin_so.o: No such file: No such file or directory
collect2: ld returned 1 exit status 
Run Code Online (Sandbox Code Playgroud)

任何建议都会有所帮助

ruby android rhodes

3
推荐指数
1
解决办法
2442
查看次数

标签 统计

ruby ×3

android ×1

exif ×1

iphone ×1

rhodes ×1

rspec ×1

ruby-on-rails ×1

smtp ×1