首页 \ 问答 \ 在Vagrant中“找不到RubyGem puppet”(“Could not find RubyGem puppet” in Vagrant)

在Vagrant中“找不到RubyGem puppet”(“Could not find RubyGem puppet” in Vagrant)

我可以手动运行bundle install并获得恢复正常的东西,但是当我让Puppet提供一个Vagrant框时,这是第二次(第一次我获得成功输出)。

[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/default.pp...
stdin: is not a tty
/opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error': Could not find RubyGem puppet (>= 0) (Gem::LoadError)
    from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
    from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1276:in `gem'
    from /opt/vagrant_ruby/bin/puppet:18
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

我不是在任何地方请求puppet gem,它不在我的Gemfile中,我的清单也不需要它。 为什么要查找puppet gem,我该如何摆脱这个错误?


I can manually run bundle install and get something sane back, but when I let Puppet provision a Vagrant box, this happens the second time (the first I get successful output).

[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/default.pp...
stdin: is not a tty
/opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error': Could not find RubyGem puppet (>= 0) (Gem::LoadError)
    from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
    from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1276:in `gem'
    from /opt/vagrant_ruby/bin/puppet:18
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

I am not requesting the puppet gem anywhere, it's not in my Gemfile and my manifest does not require it either. Why is the puppet gem being looked for, and how do I get rid of this error?


原文:https://stackoverflow.com/questions/12052106
更新时间:2024-03-26 12:03

最满意答案

任何群集工作者都可以使用mongodb或mongoose轻松访问MongoDB以获取所需数据。 它也可以将数据作为缓存存储在本地。
一旦socket.io客户端连接,它将绑定到一个worker,并且在执行期间不会交换worker。
为了共享会话,您需要为socket.io创建会话中间件,该中间件将从其中一个工作人员请求来自MongoDB的会话详细信息。 查看答案, 答案解释了如何从共享会话详细信息访问socket.io中的会话数据。 并且为了使其成为集群,使用connect-mongo而不是MemoryStorage,它允许在mongo中存储会话数据,并且它将使工作人员共享会话详细信息。


Any of clustered worker can easily access MongoDB using mongodb or mongoose in order to get required data. As well it can store that data locally as a cache.
Once socket.io client is connected it will be bound to one of workers and will not swap workers during execution.
In order to share sessions you need to create session middleware for socket.io that will ask for session details from MongoDB from one of the workers. Check this answer which explains how to access session data in socket.io from shared session details. And in order to make it clustered, instead of MemoryStorage use connect-mongo that allows to store session data within mongo and it will make session details shared over workers.

相关问答

更多
  • 编辑:在Socket.IO 1.0+中,而不是设置具有多个Redis客户端的存储,现在可以使用更简单的Redis适配器模块。 var io = require('socket.io')(3000); var redis = require('socket.io-redis'); io.adapter(redis({ host: 'localhost', port: 6379 })); 下面显示的例子会更像这样: var cluster = require('cluster'); var os = requ ...
  • 您不使用io.on()侦听来自服务器上给定连接的消息。 相反,您可以在侦听给定套接字连接的情况下执行此操作,然后将事件处理程序添加到该特定套接字,并且当您要发送回该套接字时,还可以使用该socket对象发送回。 这允许您发送回刚向您发送消息的同一个套接字: io.on('connection', function (socket) { socket.on('log-in', function (data) { User.findOne({'username': data.userna ...
  • 也许你最好使用像RabbitMQ这样的消息队列解决方案? 这样,您就可以将消息从一个进程发送到另一个进程,并自动通知它。 我已经使用Node.js,socket.io和RabbitMQ在应用程序中实现了通知(如果它在您感兴趣的区域附近)。 这是一个开源项目,如果你愿意,我会分享它(它在GitHub上,但是还没有合并)。 在任何情况下,在这种情况下,事件总是比轮询更好(如果可能的话)。 Here is what I have accomplished rather than using the setInte ...
  • 对于那些可能面临类似问题的人,事实证明我有两次以下的行 var io = require('socket.io')(server); 删除一个,解决了问题。 For those who may face similar issue, it turned out that I have the following line twice var io = require('socket.io')(server); Removing one, solved the issue.
  • 似乎问题可能与Socket.IO安装的节点模块有关。 当我安装redis( npm install hiredis redis )并使用redis模块为RedisStore创建客户端时,一切都突然完美。 我已经运行了超过一个小时,有大约500个并发连接,没有看到一个错误,并且正在使用每个节点进程。 hiredis@0.1.14 redis@0.7.2 在端口6379上运行Redis 2.6rc3。 更新:在Node.s 0.8中,看起来集群库应该更加成熟,因此上述代码/问题可能会过时: http : //n ...
  • 正如robertklep在评论中指出的那样,使用粘性会话解决了这个问题。 但是,我用于此目的的包是socketio-sticky-session 。 我的最终cluster.js代码如下所示: var sticky = require('socketio-sticky-session') var cluster = require('cluster'); var os = require('os'); var options = { proxy: false, num: require('o ...
  • 在您的客户端代码中,您尝试连接到端口8080,这与您的服务器正在侦听的端口不一致。 In your client code you're trying to connect to port 8080, which is inconsistent with the port your server is listening on.
  • 我可以使用MongoDB作为Socket.io的内存存储 是的,你可以尝试mong.socket.io 用Redis替换MongoDB作为数据库吗? Redis和MongoDB是不同类型的数据库,而mongodb是面向文档的redis是面向键/值的(我们甚至可以说redis是一个数据结构服务器)。 什么能够更有效地构建实时Web应用程序并提供最大并发连接? Redis肯定会比mongo更快,它支持pub / sub开箱即用(而mong.socket.io使用集合来模拟pub / sub)但你必须知道存储在r ...
  • 任何群集工作者都可以使用mongodb或mongoose轻松访问MongoDB以获取所需数据。 它也可以将数据作为缓存存储在本地。 一旦socket.io客户端连接,它将绑定到一个worker,并且在执行期间不会交换worker。 为了共享会话,您需要为socket.io创建会话中间件,该中间件将从其中一个工作人员请求来自MongoDB的会话详细信息。 查看此答案, 该答案解释了如何从共享会话详细信息访问socket.io中的会话数据。 并且为了使其成为集群,使用connect-mongo而不是Memory ...
  • 首先,请不要将用户置于全局变量中,最好将其放在模块中,并在需要时在其他地方使用它。 你可以这样做: users.js var users = { _list : {} }; users.create = function(data){ this._list[data.id] = data; } users.get = function(user_id){ return this._list[user_id]; }; users.getAll = function(){ re ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)