Reputation: 1930
On my system (OS X), I have an application running on Rails 3.1.0, ruby 1.8.7.
I installed Vagrant and set it up with Ubuntu virtual. I created a new project ABC from within the virtual machine and installed ruby 1.9.3 and Rails 3.2.6, on the virtual machine.
Now, when I exit Vagrant virtual machine and want to ssh into it again, from the ABC project directory, it struggles with a conflict in the ABC project's Gemfile:
~/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:90:in 'materialize': Could not find actionmailer-3.2.6 in any of the sources (Bundler::GemNotFound)
When I remove the Gemfile from ABC project's directory, I can use Vagrant without any issue.
Why is Vagrant checking out project's Gemfile, instead of just running the virtual machine?
Anyone experienced something like this before?
Upvotes: 4
Views: 747
Reputation: 230
Vagrant uses Gemfile for plugins. See the documentation for plugins https://docs.vagrantup.com/v2/plugins/packaging.html.
So vagrant thinks that your rails gems are plugins for vagrant and fails.
Upvotes: 1
Reputation: 1930
My current setup uses Vagrantfile detached from rails directory.
I ended up with this settings after I started using Puppet provision scripts, various bash scripts, project documentation folder outside of rails etc.
It makes more sense to keep rails app as clean as possible and not poisoning it with local development tools files (Vagrantfile).
The question is still valid though. I'm not sure whether this qualifies for an Issue report on github...
Upvotes: 0