tag:help.appveyor.com,2012-11-13:/discussions/questions/585-what-setup-for-build-cache-is-require-for-bundle-installAppVeyor: Discussion 2018-10-19T08:16:47Ztag:help.appveyor.com,2012-11-13:Comment/349227922014-10-13T12:14:16Z2014-10-13T12:14:16ZWhat setup for build cache is require for bundle install<div><p>I "think" i might have answered my own question :-)</p>
<p>Using this:</p>
<p><a href=
"http://stackoverflow.com/questions/5107141/ruby-on-rails-where-to-gems-actually-go">
http://stackoverflow.com/questions/5107141/ruby-on-rails-where-to-g...</a></p>
<p>Added the following commands to my build script:</p>
<pre>
<code> - cmd: gem env
- cmd: bundle show rack</code>
</pre>
<p>Which resulted in this:</p>
<p><a href=
"https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/build/1.0.8#L87">
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...</a></p>
<p>So I have added this to my cache settings:</p>
<pre>
<code>cache:
- C:/Ruby193/lib/ruby/gems/1.9.1
- C:/Users/appveyor/.gem/ruby/1.9.1</code>
</pre>
<p>And just trying this out. Does this seem like a sensible
approach?</p>
<p>Thanks</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-13T12:23:23Z2014-10-13T12:23:23ZWhat setup for build cache is require for bundle install<div><p>Hmmm, did I do something wrong? My build just failed:</p>
<p><a href=
"https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/build/1.0.9">
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...</a></p>
<p>With the error:</p>
<p><code>The system cannot find the path specified</code></p>
<p>All I did was add this:</p>
<p><a href=
"https://github.com/adnuguk/adnuguk.github.io/commit/34b7370a096a9e2607e6aff25af66848e9ae3aba">
https://github.com/adnuguk/adnuguk.github.io/commit/34b7370a096a9e2...</a></p>
<p>It is like the caching was able to find the folder, even though
the <code>gem env</code> command just told me that it was
there.</p>
<p>Any thoughts?</p>
<p>Thanks!</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T12:40:49Z2014-10-14T12:40:49ZWhat setup for build cache is require for bundle install<div><p>Ok, looks like I am getting "somewhere" with this.</p>
<p>If I change from this:</p>
<pre>
<code>cache:
- C:/Ruby193/lib/ruby/gems/1.9.1
- C:/Users/appveyor/.gem/ruby/1.9.1</code>
</pre>
<p>To this:</p>
<pre>
<code>cache:
- C:\Ruby193\lib\ruby\gems\1.9.1</code>
</pre>
<p>i.e. use backslashes, rather than forward slashes, then the
build caching works.</p>
<p>However, then the rest of the build stops working properly
:-(</p>
<p>Here is the output of the build when caching is enabled:</p>
<p><a href=
"https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/build/1.0.16">
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...</a></p>
<p>And here is the output from a build straight after the last one,
with caching disabled:</p>
<p><a href=
"https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/build/1.0.17">
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...</a></p>
<p>As you can see it is the <code>rake generate</code> step where
things start to go wrong. I honestly have no idea why this is
happening, or what effect the build caching is having on the
process. Can anyone help?</p>
<p>Thanks!</p>
<p>Gary</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T18:12:49Z2014-10-14T18:12:49ZWhat setup for build cache is require for bundle install<div><p>Maybe cache already contains some invalid data.</p>
<p>I've just reset the cache for this project - give it another try
with cache enabled.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T18:32:47Z2014-10-14T18:32:47ZWhat setup for build cache is require for bundle install<div><p>Re-running build now, will keep you posted.</p>
<p>Thanks!</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T18:54:17Z2014-10-14T18:54:17ZWhat setup for build cache is require for bundle install<div><p>Hello Feodor,</p>
<p>Sorry to report that the same problem occured:</p>
<p><a href=
"https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/build/1.0.19">
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...</a></p>
<p>Do you know if the folder that I am caching is all that is
required? I am a complete noob in Ruby, and I don't know if there
is other stuff that I need to cache or not.</p>
<p>Thanks</p>
<p>Gary</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T19:04:29Z2014-10-14T19:04:29ZWhat setup for build cache is require for bundle install<div><p>That's interesting. Maybe there is some issue with file
timestamps restored from cache.<br>
Btw, this is how it works in Travis: <a href=
"http://docs.travis-ci.com/user/caching/">http://docs.travis-ci.com/user/caching/</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T19:21:06Z2014-10-14T19:21:06ZWhat setup for build cache is require for bundle install<div><p>Another idea! Many gems put their bash or CMD scripts into
<code>bin</code> folder to make tooling work from command line, for
example <code>jekyll</code>.</p>
<p>I think you should also try caching <code>C:\Ruby193\bin</code>
folder in addition to that one.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/349227922014-10-14T19:23:35Z2014-10-14T19:23:35ZWhat setup for build cache is require for bundle install<div><p>I cleared your cache one more time.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/349227922014-10-15T07:01:09Z2014-10-15T07:01:09ZWhat setup for build cache is require for bundle install<div><p>You sir, are a genius!</p>
<p>Build now working:</p>
<p><a href=
"https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io">https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io</a></p>
<p>with this:</p>
<pre>
<code>cache:
- C:\Ruby193\lib\ruby\gems\1.9.1
- C:\Ruby193\bin</code>
</pre>
<p>as cache settings.</p>
<p>Thanks again!</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-15T07:10:09Z2014-10-15T07:10:09ZWhat setup for build cache is require for bundle install<div><p>The above has taken my build times from <code>5 min 37
sec</code> to <code>2 min 28 sec</code></p>
<p>Gary</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-15T16:41:11Z2014-10-15T16:41:11ZWhat setup for build cache is require for bundle install<div><p>Awesome! This definitely should go to the docs!</p>
<p>Thanks for the update!</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/349227922014-10-15T18:20:36Z2014-10-15T18:20:36ZWhat setup for build cache is require for bundle install<div><p>How does the documentation work here at AppVeyor, do you accept
any community contributions?</p></div>gep13tag:help.appveyor.com,2012-11-13:Comment/349227922014-10-16T03:59:59Z2014-10-16T03:59:59ZWhat setup for build cache is require for bundle install<div><p>Website is in private repo right now, but we're going to make it
public.</p>
<p>If you want to help with content (any, not only help) - this
would be fantastic help!</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/349227922014-10-16T06:33:26Z2014-10-16T06:33:26ZWhat setup for build cache is require for bundle install<div><p>Happy to help out, where and when I can :-)</p>
<p>Perhaps a separate Issues list, or at least categorized issues,
with tasks that can be cherry picked and raised as PR's into the
documentation repo?</p></div>gep13