标签: bundle

由于缺少make命令,bundle install失败

我正在尝试运行"捆绑安装".我已经安装了Ruby devkit并将它添加到我的路径中.它抱怨说不是一个公认的命令.这不是devkit应该添加的吗?在搜索此问题的答案时,每个答案似乎都是"安装devkit".我在Windows 7上,配置我的环境以允许它构建宝石的最简单方法是什么?

我收到以下输出:

$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using activesupport (2.3.11)
Using rack (1.1.0)
Using actionpack (2.3.11)
Using actionmailer (2.3.11)
Using activerecord (2.3.11)
Using activeresource (2.3.11)
Using annotate (2.4.0)
Using authlogic (2.1.6)
Using columnize (0.3.2)
Using haml (3.0.25)
Using compass (0.10.6)
Using configuration (1.2.0)
Using daemons (1.0.10)
Using declarative_authorization (0.5.2)
Using delayed_job (2.0.7)
Using i18n (0.5.0)
Using faker (0.9.5)
Using mocha (0.9.12)
Using will_paginate (2.3.15)
Using haml_scaffold (1.1.0)
Installing json (1.4.6) with native …
Run Code Online (Sandbox Code Playgroud)

bundle ruby-on-rails

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

如何使用deploy:deploy-file将OSGi包部署到Maven仓库?

我有一个OSGi包,是由另一个团队使用Maven构建的.POM文件将其包装声明为"bundle"并使用Apache Felix插件.

我需要将此工件部署到本地Maven存储库(Nexus),以便我们的内部项目可以使用它.

我已经使用deploy:deploy-file目标将bundle部署到存储库,就像使用标准JAR文件一样,这样可以正常工作.我从包中提取了嵌入的POM并在命令行上传递了它,因此命令行是:

mvn deploy:deploy-file -Dfile=3rdpartybundle.jar -DpomFile=pom.xml -DrepositoryId=internal -Durl=http://internalserver/nexus
Run Code Online (Sandbox Code Playgroud)

问题在于,当我像这样部署它时,打包被设置为bundle,因此存储库中工件的名称最终使用.bundle扩展名,而不是.jar扩展名.

现在,我们无法弄清楚如何将其声明为依赖项.如果我们这样声明:

        <dependency>
            <groupId>...</groupId>
            <artifactId>...</artifactId>
            <version>...</version>
            <type>bundle</type>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

我们收到错误,指出无法解决依赖关系.有趣的是,错误消息中的GAV坐标实际上具有"jar"作为依赖类型的值,即使我们将其设置为"bundle".

如果我们将依赖项更改为:

        <dependency>
            <groupId>...</groupId>
            <artifactId>...</artifactId>
            <version>...</version>
            <type>jar</type>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

我们得到完全相同的未解决的依赖性错误.

那么你应该如何将打包为捆绑的工件部署到Maven存储库,以便它可以用作另一个项目的编译时依赖?

谢谢

osgi bundle nexus maven

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

将位图放入Bundle

我想使用AIDL将String和Bitmap传递给服务.服务实现此AIDL方法:

void addButton(in Bundle data);
Run Code Online (Sandbox Code Playgroud)

在我的例子中,Bundle包含一个String和一个Bitmap.

调用应用程序(客户端)具有以下代码:

...
// Add text to the bundle
Bundle data = new Bundle();
String text = "Some text";
data.putString("BundleText", text);

// Add bitmap to the bundle
Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.myIcon);
data.putParcelable("BundleIcon", icon);

try {
    myService.addButton(data);

} catch (RemoteException e) {
    Log.e(TAG, "Exception: ", e);
    e.printStackTrace();
}
...
Run Code Online (Sandbox Code Playgroud)

在服务端,我有一个带有以下代码的ButtonComponent类:

public final class ButtonComponent implements Parcelable {
    private final Bundle mData;

    private ComponComponent(Parcel source) {
        mData = source.readBundle();
    }

    public String getText() {
        return mData.getString("BundleText"); …
Run Code Online (Sandbox Code Playgroud)

android bundle bitmap parcel parcelable

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

rake资产预编译失败

当我运行时bundle exec rake assets:precompile --trace,我的预编译失败但我看不出任何具体原因.

请参阅此pastebin以获取我的输出:http://pastebin.com/zggZyPyM

bundle ruby-on-rails

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

是否有公共rubygems.org镜像?

是否有适用于http://rubygems.org的公共镜像?它现在对我不起作用,http://isup.me/rubygems.org说它也不起作用.

ruby gem bundle rubygems bundler

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

是否可以在编译过程中添加自定义路由?

我准备外部包,我想在编译过程中添加一些路由.将在主要app/config/config.yml设置上创建路线.

我试图router从ContainerBuilder我的CustomCompilerPass通道中获取:

$definition = $container->getDefinition('router');
Run Code Online (Sandbox Code Playgroud)

,但我得到了The service definition "router" does not exist.

是否可以在编译过程中添加自定义路由?

router bundle symfony

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

Mercurial:强迫分拆父母未知的捆绑

我有一个名为repo1的存储库,它是我的基础.

我把它克隆到repo2.

我有另一个存储库包含一些不相关的文件和历史记录,名为other_repo.

多亏了hg convert,我可以将other_repo的子集导入repo2,同时保留文件的历史记录:

hg convert --filemap my_file other_repo temp_repo
cd repo2
hg pull -f temp_repo
Run Code Online (Sandbox Code Playgroud)

这是完美无瑕的.

但是,现在,如果我将repo2中的更改捆绑在一起,并尝试在repo1中解包它们,我会收到以下错误:

adding changesets
transaction abort!
rollback completed
abort: 00changelog.i@82dc9cd3be46: unknown parent!
Run Code Online (Sandbox Code Playgroud)

嗯,这很正常.新的父级来自other_repo,现在需要它.请注意,来自repo2的hg pull in repo1工作正常.

在这种情况下(当存储库的历史很好,hg verify没有抱怨,我没有剥离任何东西),有没有办法强制解开捆绑行动?

mercurial bundle

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

Webpack的旧式JS捆绑和最小化

我的项目有多个JS-Files,其中包含不进行任何导出的函数声明,并使用jquery,jquery-ui和其他需要全局访问的库。函数通常由html元素()中的内联JavaScript调用<button onclick="doStuff()">...

我现在的目标是将应用程序文件捆绑到bundle.js中,将供应商文件捆绑到vendor.js中。我已经设法完成了第二项任务,但是第一个任务没有按我希望的那样工作。

bundle.js文件应仅包含所有已串联+缩小的.js文件,然后在全局上下文中执行。

到目前为止我尝试过的是:

  • 脚本加载器(无缩小...)
  • exports-loader(上下文问题?)
  • 暴露加载器(实际上并没有在包之外全局暴露函数,需要导出)

为了便于讨论,我给出了一个简化的方案:

src / a.js

function doStuffA() {
    alert("A");
}
Run Code Online (Sandbox Code Playgroud)

src / b.js

function doStuffB() {
    alert("B");
}
Run Code Online (Sandbox Code Playgroud)

src / index.js

require("script!./a");
require("script!./b");
Run Code Online (Sandbox Code Playgroud)

index.html

<body>
    <button onclick="doStuffA()">A</button>
    <button onclick="doStuffB()">B</button>
    <script src="bundle.js"></script>
    <script src="vendor.js"></script>
</body>
Run Code Online (Sandbox Code Playgroud)

webpack.config.js

var webpack = require("webpack");

module.exports = {
  entry: {
    app: "./src/index.js",
    vendor: [
      "jquery",
      "jquery-ui"
    ]
  },
  output: {
    path: __dirname,
    filename: "bundle.js"
  },
  module: {
    loaders: [
      {test: /\.json$/, loader: "json"}, …
Run Code Online (Sandbox Code Playgroud)

javascript jquery bundle bundling-and-minification webpack

5
推荐指数
0
解决办法
795
查看次数

Symfony 4:Var-dumper无法正常工作

我试图在symfony 4中使用var-dumper包中的精彩转储函数,由于某种原因我收到以下错误:

无法启动会话,因为标题已由第181行的"vendor\symfony\var-dumper\Dumper\AbstractDumper.php"发送.

此外,当我尝试在树枝模板中使用{%dump foo%}标记时,我收到一个错误:

未知的"转储"标签.

谁能帮我?

php bundle var-dump symfony twig

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

捆绑软件安装找不到与宝石“捆绑包”兼容的版本

当我键入捆绑安装时,出现此错误。我试图找到解决方案,但没有任何解决方案。请帮我。

 Bundler could not find compatible versions for gem "bundler":
      In Gemfile:
        rails (= 4.1.8) was resolved to 4.1.8, which depends on
          bundler (< 2.0, >= 1.3.0)

      Current Bundler version:
        bundler (2.0.1)
    This Gemfile requires a different version of Bundler.
    Perhaps you need to update Bundler by running `gem install bundler`?

    Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails
    (= 4.1.8)', in any of the sources.

    Bundler could not find compatible versions for …
Run Code Online (Sandbox Code Playgroud)

bundle ruby-on-rails

5
推荐指数
3
解决办法
6650
查看次数