What setup for build cache is require for bundle install
Hello,
I am a bit of a noob in terms of all things ruby, so I am looking for some help.
As part of the deployment of my blog site, which is using
octopress as the engine, I run the command bundle
install
. This goes off and grabs a bunch of installations
each time I build my blog. I figure I should be able to cache these
files using the appveyor build cache, but I have no idea what
folder they end up going into.
Any thoughts on which folder I should add to the build cache to speed up this installation process, and not have to download the files each time?
Thanks!
Gary
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by gep13 on Oct 13, 2014 @ 12:14 PM
I "think" i might have answered my own question :-)
Using this:
http://stackoverflow.com/questions/5107141/ruby-on-rails-where-to-g...
Added the following commands to my build script:
Which resulted in this:
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...
So I have added this to my cache settings:
And just trying this out. Does this seem like a sensible approach?
Thanks
2 Posted by gep13 on Oct 13, 2014 @ 12:23 PM
Hmmm, did I do something wrong? My build just failed:
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...
With the error:
The system cannot find the path specified
All I did was add this:
https://github.com/adnuguk/adnuguk.github.io/commit/34b7370a096a9e2...
It is like the caching was able to find the folder, even though the
gem env
command just told me that it was there.Any thoughts?
Thanks!
3 Posted by gep13 on Oct 14, 2014 @ 12:40 PM
Ok, looks like I am getting "somewhere" with this.
If I change from this:
To this:
i.e. use backslashes, rather than forward slashes, then the build caching works.
However, then the rest of the build stops working properly :-(
Here is the output of the build when caching is enabled:
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...
And here is the output from a build straight after the last one, with caching disabled:
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...
As you can see it is the
rake generate
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?Thanks!
Gary
Support Staff 4 Posted by Feodor Fitsner on Oct 14, 2014 @ 06:12 PM
Maybe cache already contains some invalid data.
I've just reset the cache for this project - give it another try with cache enabled.
5 Posted by gep13 on Oct 14, 2014 @ 06:32 PM
Re-running build now, will keep you posted.
Thanks!
6 Posted by gep13 on Oct 14, 2014 @ 06:54 PM
Hello Feodor,
Sorry to report that the same problem occured:
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io/buil...
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.
Thanks
Gary
Support Staff 7 Posted by Feodor Fitsner on Oct 14, 2014 @ 07:04 PM
That's interesting. Maybe there is some issue with file timestamps restored from cache.
Btw, this is how it works in Travis: http://docs.travis-ci.com/user/caching/
Support Staff 8 Posted by Feodor Fitsner on Oct 14, 2014 @ 07:21 PM
Another idea! Many gems put their bash or CMD scripts into
bin
folder to make tooling work from command line, for examplejekyll
.I think you should also try caching
C:\Ruby193\bin
folder in addition to that one.Support Staff 9 Posted by Feodor Fitsner on Oct 14, 2014 @ 07:23 PM
I cleared your cache one more time.
10 Posted by gep13 on Oct 15, 2014 @ 07:01 AM
You sir, are a genius!
Build now working:
https://ci.appveyor.com/project/GaryEwanPark/adnuguk-github-io
with this:
as cache settings.
Thanks again!
11 Posted by gep13 on Oct 15, 2014 @ 07:10 AM
The above has taken my build times from
5 min 37 sec
to2 min 28 sec
Gary
Support Staff 12 Posted by Feodor Fitsner on Oct 15, 2014 @ 04:41 PM
Awesome! This definitely should go to the docs!
Thanks for the update!
13 Posted by gep13 on Oct 15, 2014 @ 06:20 PM
How does the documentation work here at AppVeyor, do you accept any community contributions?
Support Staff 14 Posted by Feodor Fitsner on Oct 16, 2014 @ 03:59 AM
Website is in private repo right now, but we're going to make it public.
If you want to help with content (any, not only help) - this would be fantastic help!
15 Posted by gep13 on Oct 16, 2014 @ 06:33 AM
Happy to help out, where and when I can :-)
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?
gep13 closed this discussion on Oct 17, 2014 @ 06:37 AM.