Search code examples
ruby-on-railsrubyinstallationrvmbundle

Running "bundle install" fails and asks me to run "bundle install"


In fact, all gem-related commands result in the same error message, when run from inside the existing rails app I cloned from a git repo.

$ bundle install
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.

$ gem list
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.

$ bundle update
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.

$ rails -v
Could not find tzinfo-0.3.27 in any of the sources
Run `bundle install` to install missing gems.

I thought I already had rails installed... (following commands were run from outside the app directory):

$ rails -v
Rails 3.0.3

$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]

Any idea what's up with "bundle install" telling me to run "bundle install"??


I exited my app directory and manually did

sudo gem install tzinfo -v 0.3.27

But upon entering my app directory again and trying "bundle install"...

$ bundle install
Could not find polyglot-0.3.1 in any of the sources
Run `bundle install` to install missing gems.

So I went back out of the app directory, did

sudo gem install polyglot -v 0.3.1

"bundle install" now yielded

$ bundle install
Could not find treetop-1.4.9 in any of the sources
Run `bundle install` to install missing gems.

Why am I having to manually install all these random gems that I didn't have to in the past? (new dev env). Anyone know what I could have set up wrong in my environment?


Solution

  • OK guess I fixed it..

    For the gems that running bundle install complained about when run from inside the app directory, I installed them by going outside the app directory and doing sudo gem install [gem] one by one. Doing bundle install --gemfile=myApp/Gemfile also installed a couple of the missing gems.

    I have no idea why I wasn't able to just run bundle install from inside the app directory...lame.