小编T10*_*000的帖子

Mac OS X上的tsung_stats.pl Mavericks遇到"无法找到Template.pm"错误

我试图在Mac OS X 10.9上运行tsung(通过brew安装)运行tsung_stats.pl并出现错误:

无法在@INC中找到Template.pm(@INC包含:/Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16/Network/Library/Perl/5.16/darwin-thread-multi- 2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16/System/Library/Perl /额外/ 5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16.)在tsung_stats.pl第564行

我搜索,似乎我必须安装perl模板,所以我运行"sudo cpan模板",但仍然得到相同的错误.

cpan和perl都在/ usr/bin /中.Tsung位于/usr/local/Cellar/tsung/1.5.0/bin/tsung

版本是:perl:perl 5,version 16,subversion 2(v5.16.2)cpan:1.57 tsung:1.5.0

我搜索了我的系统,发现没有文件名Template.pm.我找到的最接近的是两个TextTemplate.pm文件

/System/Library/Perl/Extras/5.16/Locale/Maketext/Extract/Plugin/
/System/Library/Perl/Extras/5.12/Locale/Maketext/Extract/Plugin/
Run Code Online (Sandbox Code Playgroud)

以下代码段从第563行开始:

sub html_report {
    require Template;
    my $titre     = 'Tsung ';
    my $version   = $tagvsn;
    my $contact   = 'tsung-users@process-one.net';
    my $output   = 'index.html';

    my $tt = Template->new({
                            INCLUDE_PATH => $template_dir,
                            PRE_CHOMP    => 1,
                            INTERPOLATE  => 1,
                           }) or die "Template error " . Template->error();
    my $xml_conf;
    opendir (DIR, ".") or warn "can't open …
Run Code Online (Sandbox Code Playgroud)

macos perl tsung osx-mavericks

10
推荐指数
2
解决办法
7789
查看次数

如何在没有控制台的情况下关闭rails服务器?

rails server在Mac OS X终端上启动了一个" ".据说如果我只是在那个终端点击Ctrl+ c,我可以把它关闭.但我不小心关闭了终端,现在我无法关闭它.

我开始了另一个测试项目并rails server再次尝试" ",我得到了

已经在使用的地址 - bind(2)(Errno :: EADDRINUSE)"错误.

有人可以帮忙吗?

ruby-on-rails

9
推荐指数
1
解决办法
9755
查看次数

Gitblit推送错误"错误:RPC失败;结果= 52,HTTP代码= 0"

在我的Mac OS X 10.8上安装gitlbit,但仍然无法推送!

在Gitblit Web界面中,我创建了一个名为empty的空存储库,并通过以下命令将其克隆到本地存储:

git clone https://localhost:8443/git/test/empty.git
Run Code Online (Sandbox Code Playgroud)

我添加了一个文件并提交更改并添加了一个遥控器

git remote add gitblit https://localhost:8443/git/test/empty.git
Run Code Online (Sandbox Code Playgroud)

然后我尝试推动:

git push -v gitblit master
Run Code Online (Sandbox Code Playgroud)

并且错误显示:

Pushing to https://localhost:8443/git/test/empty.git
Counting objects: 3, done.
Writing objects: 100% (3/3), 215 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
POST git-receive-pack (351 bytes)
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)

我尝试了ssl和缓冲区设置,但没有帮助.

git config http.postBuffer 524288000
git config http.sslVerify …
Run Code Online (Sandbox Code Playgroud)

git rpc push gitblit

7
推荐指数
1
解决办法
7345
查看次数

Android上的HTML5 <video>元素无法播放

像iPhone这样的视频标签适用于iPhone,但不适用于Android:

<video id="video" width="320" height="240" poster="video/placeholder.jpg" autobuffer controls>
  <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
  <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video>
Run Code Online (Sandbox Code Playgroud)

使用上面的代码,Android甚至无法点击剪辑.它只会看到海报图像.

然而,如下所示的视频标签适用于Android:

<video src="vpr6.mp4" poster="video/placeholder.jpg" onclick="this.play();"/>
Run Code Online (Sandbox Code Playgroud)

但是,我仍然需要多个源功能(对于Firefox ogv支持...).下面的代码不起作用(如果我将javascript粘贴到源代码中,它们也不起作用):

<video id="video" width="320" height="240" autobuffer controls onclick="this.play();">
  <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
  <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video>
Run Code Online (Sandbox Code Playgroud)

使用上面的代码,剪辑可以在Android中单击,但仍然无效.

有人可以帮忙吗?

video html5 android

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

Yii框架:别名"application.extensions.langhandler.ElangHandler"无效.确保它指向现有的PHP文件

我开发了一个网站,并且在开发机器上运行良好(Mac OS X 10.7).但是,当我将它移植到Linux服务器时,我遇到了错误:

Alias "application.extensions.langhandler.ElangHandler" is invalid. Make sure it points to an existing PHP file
Run Code Online (Sandbox Code Playgroud)

根据以下文章,它应该是一个权限问题:http: //code.google.com/p/yii/issues/detail?id = 3039

但是,我检查了受保护/扩展文件夹,并且所有文件都有755权限.我甚至试图让它们全部777只是为了看看我是否可以让它工作,但它也没有用.

有人可以帮忙吗?

permissions alias yii

2
推荐指数
1
解决办法
4347
查看次数

RSpec 2测试唯一性

我知道我应该测试验证,但我正在学习,所以想知道为什么我的代码不起作用.

环境Ruby 1.9.2,Rails 3.1,RSpect 2.6.4

我有一个产品型号:

class Product < ActiveRecord::Base
  attr_accessor :title, :description, :image_url, :price

  validates_presence_of :title, :description, :image_url, :message => "can't be blank"
  validates_uniqueness_of :title, :message => "must be unique"
  validates_numericality_of :price, :greater_than_or_equal_to => 0.01, :message => "must be a number greater than 0"
  validates_format_of :image_url, :with => %r{\.(gif|jpg|png)$}i, :message => "is a invalid image file"
end
Run Code Online (Sandbox Code Playgroud)

在spec/models/product_spec.rb中:

require 'spec_helper'

describe Product do

  before(:each) do
    @attr = { 
      :title => "Lorem Ipsum",
      :description => "Wibbling is fun!",
      :image_url => …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails rspec2

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

Yii CActiveDataProvider按日期范围标准过滤

我正在使用Yii 1.1.8.尝试在控制器操作中按日期限制$ dataProvider源.我想过滤数据集以仅显示最近2年的条目,但无法使其工作.

我在事件表中有两条记录,其中一条记录是2个月前,另一条记录是4年前.

尝试:

$dataProvider=new CActiveDataProvider('Event', array(
                    'criteria'=>array(
                        'condition'=>'date >= '.date('Y-m-d', strtotime('-2 years')). ' AND  date <='. date('Y-m-d'),
                    ),
                ));
Run Code Online (Sandbox Code Playgroud)

$dataProvider=new CActiveDataProvider('Event', array(
                    'criteria'=>array(
                        'condition'=>'date >= '.date('Y-m-d', strtotime('-2 years')),
                    ),
                ));
Run Code Online (Sandbox Code Playgroud)

$dataProvider=new CActiveDataProvider('Event', array(
                    'criteria'=>array(
                        'condition'=>'date BETWEEN '.date('Y-m-d', strtotime('-2 years')).' AND '. date('Y-m-d'),
                    ),
                ));
Run Code Online (Sandbox Code Playgroud)

全部返回"未找到结果".我究竟做错了什么?它似乎应该是简单的东西,但我很难过.

database criteria yii

0
推荐指数
1
解决办法
1万
查看次数