草庐IT

create-an-excel-file-with-plsql

全部标签

ruby-on-rails - 无法安装 gems,因为 "undefined method ` invoke_with_build_args' for nil :NilClass"

我在Rubyrails上,我正在安装RubyonRails。我正在尝试安装gems,但它没有发生,我不确定为什么以及如何修复它。$geminstallbundlerERROR:Loadingcommand:install(LoadError)dlopen(/Users/nthulanemakgato/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle,9):Librarynotloaded:/usr/local/opt/openssl/lib/libssl.1.0.0.dylibReferenced

ruby - 错误 : inreplace failed while installling with homebrew?

我想安装treetagger在OSX中。为了使它更容易,我尝试搜索Homebrew是否可行。所以我在网上找到了这个formula来自pepijnkokke用户。接下来,我尝试按如下方式安装treetagger:user@MacBook-Pro-User-2:~$brewinstall/Users/user/Downloads/tree-tagger.rb但是,我得到了以下错误:==>Installingdependenciesfortree-tagger:openssl,wget==>Installingtree-taggerdependency:openssl==>Downloadi

ruby-on-rails - 如何在 ruby​​onrails 上将数据从模型导出到 excel 文件

我正在尝试将数据从我的模型导出到Excel电子表格。我见过3种方式使用我不明白如何使用的电子表格gem,我看到的示例是写入本地文件,但我正在寻找每次用户点击链接时都会生成一个文件。创建一个名为export的方法,并在那里运行查询,然后在我看来创建一个export.xls文件,然后该文件创建我想将表格导出到excel文件,但是这种做法不允许我创建多张纸。学习了本教程,http://oldwiki.rubyonrails.org/rails/pages/HowToExportToExcel,但是这里没有显示如何将链接放在View中,在我看来我在路由中遗漏了一些东西,我可以提供github以

ruby-on-rails - 谁读取了 ENV ['SSL_CERT_FILE' 的值]?

我曾经收到以下错误:OpenSSL::SSL::SSLError:SSL_connectreturned=1errno=0state=SSLv3readservercertificateB:certificateverifyfailedfromC:/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:678:in`connect'通读后this,我发现修复是从here下载cacert.pem文件.该帖子建议做这样的事情:ENV['SSL_CERT_FILE']=File.join(File.dirname(__FILE__),"cacert.pem")而且,确实,

ruby-on-rails - NoMethodError:#<RSpec::ExampleGroups::CompetitionsController::Create> 的未定义方法 `mock'

Variants这个问题已被多次问到,但大多数都与摩卡有关,而我没有使用它。我是Rails的新手,所以这看起来微不足道,但我无法在我的规范文件中使用mock(用于名为competitions的Controller)。require'rails_helper'require'spec_helper'describeCompetitionsControllerdobefore:eachdo@fake_c=mock(Competition,:competition_id=>1,:competition_name=>'one',:competition_des=>'any')enddescri

ruby - Cucumber 测试无法启动,错误为 "Display socket is taken but lock file is missing.."

运行cucumber后bundleexeccucumberfeatures/emails.feature:20我遇到了错误Displaysocketistakenbutlockfileismissing-checktheHeadlesstroubleshootingguide(Headless::Exception)/Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:195:inensure_xvfb_is_running'/Users/me/.rbenv/ver

ruby-on-rails - Capistrano gzip : stdin: unexpected end of file interruption

我在Capistrano部署方面遇到问题。部署过程因Gzip错误而被丢弃。它可以是什么?capflowdeploy*executing`flow'*executing`deploy'*executing`deploy:update'**transaction:start*executing`deploy:update_code'*getting(viacheckout)revisionto/tmp/20111214204507executinglocally:cp-R./tmp/20111214204507commandfinishedin413mscompressing/tmp/20

ruby-on-rails - respond_with 无法在 ruby​​ on rails 中工作。为什么?

我有一个名为join的post方法,它应该执行以下操作:1)创建一个新对象2)以json对象响应这是我的代码:classGameControllerparams[:name])@p.save!respond_with({:uuid=>@p.uuid})endend出于某种原因,respond_with调用总是失败并出现以下错误:undefinedmethod`model_name'forNilClass:Class如果我将respond_with调用更改为更简单的方法,我仍然会收到错误,例如:respond_with"hello"产生这个错误:undefinedmethod`hello

ruby - 在未安装 Excel 的服务器上使用 Ruby 读写 Excel 文件

我需要在一台没有安装Excel的Linux服务器上读写(->转换)Excel文件。对于Python,存在http://www.python-excel.org/.Ruby有类似的东西吗?可能不需要处理最新的Office格式。只需旧的xls文件就足够了。 最佳答案 我同意Gonzih的观点,并且我经常使用roo。它允许我使用模板文件进行读取、写入和写入。该项目在他们的site上有很好的记录。.我总是使用类似的东西:input=Excel.new(path)output=Array.newinput.default_sheet=inpu

ruby - 机架/Sinatra LoadError : cannot load such file

我正在尝试使用Sinatra、Ruby、rack、haml、pony和SendGrid构建一个应用程序,并使用git和RVM部署在Heroku上。该应用程序是一个博客变体,应该发送一封电子邮件,其中包含在表单上提交的评论。在我的本地服务器上,当表单提交时出现以下错误:LoadErrorat/cannotloadsuchfile--ponyfile:tools.rblocation:requireline:314BACKTRACE(expand)/Users/Kevin/prog/ruby/Sinatra/Noobs/noobs.rbinblockinrequire'pony'在Hero