-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Deployment fails when using paths in Gemfile #2175
Comments
@josevalim, I thought package was only supposed to cache git gems, not path gems? On Nov 21, 2012, at 8:35 AM, Alexander Uvarov [email protected] wrote:
|
@indirect, this will make life harder. |
Well, if --deployment is moving the gem from one place to the other, that is obviously bug that needs to be fixed. Another discussion though is if package should package paths and my answer would be yes. Maybe we can support something like @wildchild can you provide a failing test case? You should find it easy to write one in case you haven't written any yet. |
@josevalim, if package packages path gems, then it's definitely moving them from one place to another. If packing path gems is what we want, we'll need to override the frozen check for path gems to allow packaged ones. On Nov 21, 2012, at 9:39 AM, José Valim [email protected] wrote:
|
@josevalim, before I fall into writing specs, can we clarify desired behaviour? Just to be clear,
By the way, if 1st and 2nd steps are ok, it seems weird that developer must install cached for deployment gems locally just to make this deployment possible (to alter paths in Gemfile.lock). Shouldn't bundler alter path in 1st step and than just ignore path mismatch? |
I am not sure if |
@josevalim, bundler does not change anything for git at all. I guess it behave absolutely differently in this case. I am wondering why not just bundler build gems for both git and path specs and copy it to vendor/cache just like for regular gems does. |
@wildchild so I don't think we should change the Gemfile.lock at all. We should just check if there is something in the cache and use it. I believe building the gems would be too error prone but that is up to discussion. /cc @wycats |
I think the same. By the way, it changes. It's a related issue. |
Nice! If you haven't ever played with Bundler, I would recommend you to |
@josevalim, I pushed 2 specs. After some investigation I suspect that there are much more problems with path. Bundler behave differently if there is a dependency in a .gemspec of a gem specified as a path gem. For example, this spec 7b7c227 passes unless dependency is specified. |
Guys, does these failing specs make sense? If so, could anyone show me the right way? I looked through the sources and I can't imagine where Gemfile.lock gets updated path |
Interesting. I am wondering if maybe we should kill |
Any status update?
Much better than run and hide from a problem. |
I think that the specs make sense, and I think the correct solution is probably to override the frozen check. I just haven't had time to work on it yet, sorry. |
After spending some time investigating this, I now think the correct solution is to update the Gemfile.lock with the cache path during the |
Hi I've just run into this. Gems specified via Docs say: Does it really make sense to use gems from "path" locations and then package them in vendor/cache to be used in bundle --local or --deployment scenarios? Or maybe instead I should simply add those gems manually to |
I've also had to deal with this. As a workaround, I changed the line in my gem 'shared', path: Pathname.new('../shared').exist? ? '../shared' : 'vendor/cache/shared' |
This issue is open for anyone to start working on a PR for |
I'm working on it;) |
after running bundle package --all && bundler install --local Gemfile.lock contains new path -- "vendor/cache/my-gem"
Gemfile still contains old path as expected.
bundle install --deployment will end with:
Is it normal behavior and I must edit paths in Gemfile on deployment?
The text was updated successfully, but these errors were encountered: