Tag: vagrant

在Laravel命令类中获取Packages composer.json值

我希望能够在我为laravel开发的特定包中设置一些configuration值。 例: "extra": { "maxminddbpath": "src/storage/db" }, 我需要从我的一个类中访问这些值。 这怎么能做到。 伪代码可能看起来像这样: public function fire() { $this->getCompiler()->getPackage()->getExtra();//returns the extra node from composer.json } 对于我的例子,我将访问扩展\ Command类中的值 我倾向于同意,在某些人看来,这是一种狂热或愚蠢的行为,因为有更好的select。 我明白那个 在这种情况下,你可以回答这个问题吗?是否有任何情况下可以find一个更好的软件架构师来findconfiguration文件(composer.json)中的临时静态值? 我认为现在发生的事情是我们正在回避这个问题,说明不应该这样做。 那么可以说一个json文件的configuration与应用程序的configuration无关, 在本质上,composer.jsonconfiguration文件不能为真。 看看这个代码在github上: https : //github.com/mente/MaxMindGeoIpBundle/blob/master/Composer/ScriptHandler.php#L22 这是为交响乐而devise的,不是拉拉维尔,而是彼此的父子分支。 我假设在laravel框架内会有一些东西来处理这种请求。 其他用途可能包括: 读Grunt文件 阅读Rubyconfiguration 读取节点configuration 读取部署设置 读Vagrantconfiguration build议图书馆?

节点在stream量供应期间安装,但在连接到ssh时消失

我真的厌倦了这一点,我不知道什么是错的。 我使用的是Vagrant 1.7.2 , Ubuntu 13.04 , Virtual Box 4.3 12 r93733 我的主机是Windows 8.1 这是我的bootstrap.sh上find的节点引导脚本 echo "— Installing Node.js —" curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | bash source ~/.nvm/nvm.sh nvm install 0.12 nvm use 0.12 sudo cp ~/.nvm/versions/nodejs/v0.12/bin/node /bin/node echo "— Install node app dependencies –" cd /var/www/html/node npm install express npm install youtube-audio-stream 在configuration期间,我可以看到该节点安装正确。 我可以看到Now using node […]

stream浪者,泊坞窗,共享卷在初始configuration时还没有准备好

我玩docker和stream浪,以隔离我的开发环境在OS X上。 到目前为止,我已经find了一些很好的教程和介绍,但其中一些post似乎已过时,因为stream浪者参与… 我的主要问题是从我的主机到docker集装箱安装一个共享文件夹 – 这样的工作,但我不知道如果我遇到一个stream浪者/docker问题或只是做错了什么。 让我解释我目前的状态: 我正在为我的虚拟机使用以下Vagrantfile.boot2docker ,并将当前目录安装到vm中的/app 。 当我更新主机上的文件时,我可以看到虚拟机内的文件夹以及内容的变化。 VAGRANTFILE_API_VERSION = "2" Vagrant.require_version ">= 1.6.3" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "yungsang/boot2docker" config.vm.network "private_network", ip: "192.168.33.10" config.vm.synced_folder ".", "/app", type: "rsync" # Uncomment below to use more than one instance at once # config.vm.network :forwarded_port, guest: 2375, host: 2375, auto_correct: true # Fix busybox/udhcpc […]

PM2上的stream浪汉 – 启动应用程序后共享文件夹被安装

如何设置PM2启动应用程序后共享目录被挂载? 默认情况下, pm2 startup会在操作系统启动后添加脚本,这会导致程序错误(因为那时还没有安装文件夹)。

stream浪汉提供,不能开始咕噜

我试图让stream浪汉安装nodejs正常运行所需的所有东西。 然后,在节点项目的根文件夹上执行“nohup grunt server&”之后,我期望服务器在端口3030上监听,但事实并非如此。 如果正确的configuration后,我做stream浪ssh咕噜服务器& 所有的工作,因为它应该。 只有当configuration器运行它不起作用。 这是我的Vagrantfile的一部分: git clone https://github.com/airbnb/rendr.git cd /home/temp/rendr/examples/00_simple/ npm install cp -rf /home/temp/rendr/examples/00_simple/ /home/website/nodejs/rendr-try1 cd /home/website/nodejs/rendr-try1/00_simple nohup grunt server & 所以它肯定似乎与没有在terminal上运行的提供者有关,但是有没有简单的方法来让这个运行没有像新贵那样?

苏格兰方块 – npm安装错误

我第一次开始使用Scotch Box(Vagrant LAMP堆栈),我用我的个人package.json来安装我的开发依赖项。 { "name": "myApp", "dependencies": {}, "devDependencies": { "gulp": "*", "gulp-util": "*", "gulp-plumber": "*", "gulp-coffee": "*", "gulp-concat": "*", "gulp-uglify": "*", "gulp-imagemin": "*", "gulp-compass": "*", "gulp-minify-html": "*", "gulp-minify-css": "*", "gulp-useref": "*", "del": "*", "require-dir": "*" } } 但是,当我运行npm安装,我看到很多错误,如: npm ERR! 请尝试以root / Administrator身份再次运行此命令。 npm ERR! Linux 3.2.0-23-通用 npm ERR! argv“/ usr / local / […]

Zombie.js在VirtualBox共享文件夹中缓慢运行

我正在尝试在我的Node.js项目中使用僵尸 。 该项目运行在VirtualBox虚拟机上的共享文件夹中。 当僵尸安装到共享文件夹而不是全局时,我注意到性能的大幅下降。 假设我在zombie_test.js中有以下内容: require("zombie"); 如果我在全球安装僵尸,require语句运行不到一秒钟: $ sudo npm install zombie -g … $ time node zombie_test.js real 0m0.651s user 0m0.464s sys 0m0.116s 如果我在本地安装软件包,则需要6秒钟。 $ npm install zombie –no-bin-links … $ time node zombie_test.js real 0m5.933s user 0m0.992s sys 0m1.424s 速度下降不会发生在我试过的任何其他节点模块上。 这也不会发生,如果我本地NPM安装到虚拟机上的非共享目录。 有人知道为什么这个僵尸减速,或者如果我可以做一些改进呢?

无法使用Grunt和shell(Codebox)下载ace权限错误(虚拟Macine)

从Codebox 0.8.1工作 这是一个包含Codebox用来构build其编辑器插件的3个文件的Gist 。 我在运行virtualbox ubuntu / precise64通过vagrantpipe理cmd运行npm安装所有我很好,但是当我运行sudo npm start我收到以下内容: Building addons in ./addons/ (force=false) Optimizing cb.files.editor error for optimization of cb.files.editor options= { baseUrl: 'addons/cb.files.editor', name: 'client', out: '/project/addons/cb.files.editor/addon-built.js', paths: { 'require-tools': '/project/core/cb.addons/require-tools' }, optimize: 'uglify', map: { '*': { css: 'require-tools/css/css', less: 'require-tools/less/less', text: 'require-tools/text/text' } } } { [Error: Command failed: node […]

我不能在我的Homestead虚拟机中安装laravel-elixir

我正在按照教程,我看到他们安装sudo npm安装 laravel-elixir。 但是,当我尝试做同样的,我得到这个错误: vagrant@homestead:~/Projects/dmca-app$ sudo npm install npm ERR! tar.unpack untar error /home/vagrant/.npm/gulp/3.8.11/package.tgz npm ERR! tar.unpack untar error /home/vagrant/.npm/laravel-elixir/1.0.3/package.tgz npm ERR! Linux 3.16.0-23-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! path /home/vagrant/Projects/dmca-app/node_modules/gulp/package.json npm ERR! code EPERM npm ERR! errno -1 npm ERR! Error: EPERM, chown […]

使用jQuery – JSONP从Vagrant VM上托pipe的第三方Node.js服务器获取数据

我有一个Node.js服务器监听本地主机:3000 作为一个黑盒子 , 输出我想加载到本地网站的用户界面 。 用jQuery编写的消费服务是: $('.my_selector').click(function(){ $.ajax({ url: ':3000/', method: "POST", success: function(data) { $("#content").append(data); }, error: function(jqXHR, textStatus, errorThrown) { alert('error ' + textStatus + " " + errorThrown); } }); }); 不是直接访问页面,而是加载内容并将其附加到#content 。 问题是代码不起作用。 编辑: 如果我设置localhost:3000到url我得到XMLHttpRequest Exception : jquery.min.js:4 XMLHttpRequest cannot load localhost:3000/. Cross origin requests are only supported for protocol schemes: […]