Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundler puts my gems in my project directory

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.

like image 498
Nathan Avatar asked Aug 04 '10 18:08

Nathan


People also ask

Where are bundler gems installed?

I know that when using gem install , the gem will be stored under /home/username/. rvm/gems/, under which gemset the gem was installed.

How do I change my default bundler?

gem env – try to search in provided list under GEM PATHS, in specifications/default. remove there bundler-VERSION. gemspec. install bundler, if you don't have specific: gem install bundler:VERSION --default.

What is bundler in gem?

What is Bundler? Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production.


1 Answers

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

like image 108
Carl Lerche Avatar answered Oct 08 '22 17:10

Carl Lerche