草庐IT

windows - FireFox API 安装扩展

全部标签

ruby - 从 Ruby 连接到适用于 Windows Phone 8 的 Microsoft 推送通知服务

我们正在开发一个需要推送通知的WP8应用程序。为了测试它,我们使用CURL命令行运行推送通知POST请求,确保它实际连接,使用客户端SSL证书进行身份验证并发送正确的数据。我们确实知道,当我们收到对设备的推送时,这项工作是有效的。这是我们一直用于测试目的的CURL命令:curl--certclient_cert.pem-v-H"Content-Type:text/xml"-H"X-WindowsPhone-Target:Toast"-H"X-NotificationClass:2"-XPOST-d"MytitleMysubtitle"https://db3.notify.live.ne

ruby-on-rails - 私有(private) gem 没有安装在 docker 中

我正在尝试使用docker运行一个Rails应用程序。通过github的sshurl安装的gem很少,如下所示:Gemfilegem'swagger-docs',:git=>'git@github.com:xyz/swagger-docs.git',:branch=>'my_branch'我在docker中添加了keys,它能够克隆所需的repo并从git安装gem。DockerfileRUNmkdir-p/root/.sshCOPY./id_rsa/root/.ssh/id_rsaRUNchmod700/root/.ssh/id_rsaRUNssh-keygen-f/root/.ss

ruby - 为什么在 rvm 安装中有两个 rake gemspecs?

为什么在rvm安装中有两个rakegemspecs?~-10:59>find~/.rvm/-name'rake-0.8.7.gemspec'~/.rvm/gems/ruby-1.9.2-p136/specifications/rake-0.8.7.gemspec~/.rvm/gems/ruby-1.9.2-p136@global/specifications/rake-0.8.7.gemspec#alias~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/specifications/rake-0.8.7.gemspec为什么不同?(非

ruby-on-rails - Ruby 1.9.3 -> 2.0 别名方法和扩展

我正在尝试将Ruby1.9.3应用程序升级到2.0,除了一个小问题外,一切似乎都很顺利。我写了一个模块,我将其包含在我的模型中以覆盖activerecorddestroy。它将现有的destroy方法别名为destroy!,然后覆盖destroy以更改记录上的deleted_at时间戳。仅当我升级到ruby​​2.0时,destroy!不再破坏记录,但其行为就像我的新覆盖方法一样。知道为什么会这样吗?下面是更相关的代码部分。完整要点here.defself.included(base)base.class_evaldoalias_method:destroy!,:destroyalia

使用时 Rubygems 2.0.14 不是线程安全的 bundle 程序安装消息 - RUBYGEMS VERSION : 2. 4.5.1

运行bundle安装时,我收到以下消息:Rubygems2.0.14isnotthreadsafe,soyourgemswillbeinstalledoneatatime.UpgradetoRubygems2.1.0orhighertoenableparallelgeminstallation.这很奇怪,因为在我的RubyGems环境中它说我的RubyGems版本是:2.4.5.1(见下文)~/w/Rafftopia❯❯❯gemenvRubyGemsEnvironment:-RUBYGEMSVERSION:2.4.5.1-RUBYVERSION:2.2.5(2016-04-26patc

ruby - 在 Windows 7 上运行 Jekyll

我在Windows7上运行Jekyll时遇到问题。当我运行时jekyll出现以下错误C:\temp\jekyll\kouphax.github.com>jekyllConfigurationfromC:/temp/jekyll/kouphax.github.com/_config.ymlBuildingsite:C:/temp/jekyll/kouphax.github.com->C:/temp/jekyll/kouphax.github.com/_siteunit-testingYouaremissingalibraryrequiredforTextile.Pleaserun:$[s

ruby-on-rails - 如何正确扩展 Devise Recoverable?

我希望Recoverable模块为我的用户发送带有重置密码链接的“邀请”电子邮件(该应用程序仅接受邀请),我在初始化程序中部分声明了方法:moduleDeviseclassMailerdefinvite_new_user(record)devise_mail(record,:invitation_instructions)endendendmoduleDevisemoduleModelsmoduleRecoverabledefsend_invite_user_instructions!returnunlessstatus==User::STATUS_PENDINGgenerate_re

ruby-on-rails - 本地 gem 的“bundle 安装”没有解决依赖关系,而 'gem install' 可以

我在目录“/home/enterprise/pkg”中有一个本地gem(enterprise-0.0.1.gem)。它依赖于active_directorygem(v1.5.5),这是在它的enterprise.gemspec文件中指定的,如下所示:-gem.add_dependency("active_directory")在我的应用程序的Gemfile中,我添加了以下行:-gem'enterprise','0.0.1',path=>'/home/enterprise/pkg'当我做的时候bundleinstall在我的应用程序的源目录中,只安装了企业gem。因此,我遇到了引用act

objective-c - 将 Cocoa header 链接到 ruby​​ C 扩展

我正在为ruby​​开发一个C扩展,但我需要包含来自IOBluetooth框架的header,特别是:#import#import一切都编译正常,但在运行时,扩展错误:path/to/file.rb:1:in`require_relative':dlopen(/path/to/extension.bundle,9):Symbolnotfound:_OBJC_CLASS_$_IOBluetoothDeviceInquiry(LoadError)我相当确定这与未包含在链接过程中的框架有关,但我不确定原因。任何帮助将不胜感激extconf.rb:#Loadsmkmfwhichisusedto

ruby-on-rails - 为 Ruby gem 创建安装生成器

我是构建Rubygems的新手,正在尝试我的第一个。我正在为我的gem编写一个生成器,它将在我的Rails应用程序中生成一个迁移。我希望将gem简单地包含在Rails应用程序中,运行“railsgmygem:install”以创建迁移,然后运行“rakedb:migrate”以完成所有操作。我已经找到了几种不同的方法来完成类似的任务,但到目前为止没有任何效果。我似乎无法让Rails应用程序找到生成器。我尝试过的最新指南位于此处:http://www.railsdispatch.com/posts/how-rails-3-enables-more-choices-part-1.这是我当前