Bundler把我的宝石放在我的项目目录中 [英] Bundler puts my gems in my project directory

查看:66
本文介绍了Bundler把我的宝石放在我的项目目录中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ruby 1.9.2上有一个Rails 3rc应用程序可以正常工作,但Bundler在我的项目目录中不断制作一个名为bandsintown的文件夹(bandsintown是我使用的一个gem)。据我所知,该文件夹里有我所有的宝石。我很确定这从来没有发生过。这是正常的行为吗?



我认为这可能会干扰运行测试。我收到了一个Command failed with status(1)错误,然后它几次提到bandsintown文件夹。



我发现Bundler命名该文件夹很奇怪bandownown,即使我在gemfile中注释掉了这个gem。在那个文件夹中有一个ruby文件夹,在ruby文件夹中有一个1.9.1文件夹。我不明白为什么当我使用1.9.2时说1.9.1。 1.9.1文件夹里面有一个bin,bundler,cache,doc,gems和specification文件夹。



我做了一个测试程序,捆绑安装。它不会创建一个新的文件夹,其中包含我所有的宝石。



无论如何,我的应用程序工作正常,但如果有人可以帮助我, 。如果我忽略了任何需要了解的信息,请告诉我。感谢。

解决方案

您可能正在运行以下命令: bundle install bandsintown 。该命令告诉bundler将gem安装到应用程序的 bandsintown 子目录中。为了安装宝石,您只需修改Gemfile并运行 bundle install



Bundler将会请记住您上次在.bundle / config文件中指定的位置。所以,为了重置捆绑商的内存。在您的应用程序目录中,运行rm -r .bundle / config。然后,在更新Gemfile后,只需运行 bundle install


I have a Rails 3rc app on Ruby 1.9.2 that works fine, but Bundler keeps making a folder named "bandsintown" (bandsintown is a gem I use) in my project directory. From what I can tell, the folder has all my gems in it. I'm pretty sure that this never happened before. Is it normal behavior?

I think this might be interfering with running tests. I get a "Command failed with status (1)" error and then it mentions the "bandsintown" folder a few times.

I find it odd that Bundler names the folder "bandsintown" even when I comment out that gem in the gemfile. There's a "ruby" folder in that one, and a "1.9.1" folder inside the "ruby" folder. I don't understand why it says 1.9.1 when I'm using 1.9.2. The 1.9.1 folder has a bin, bundler, cache, doc, gems and specification folder inside of it.

I made a testapp with all the same gems and did a bundle install. It doesn't make a new folder with all my gems in it.

Anyway, my app works fine, but I'd appreciate it if anyone could help me out here. If I left out any need-to-know information, let me know. Thanks.

解决方案

You are probably running the following command: bundle install bandsintown. That command tells bundler to install gems into the bandsintown subdirectory of your application. In order to install gems, all you need to do is modify your Gemfile and run bundle install.

Bundler will remember the location that you last specified in the .bundle/config file. So, in order to "reset" bundler's memory. In your application's directory, run rm -r .bundle/config.

Then, after updating your Gemfile, simply run bundle install

这篇关于Bundler把我的宝石放在我的项目目录中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆