Coder Social home page Coder Social logo

Comments (4)

jwalton avatar jwalton commented on July 24, 2024

What's especially weird is, when I try this on a vagrant VM, it works fine. Grrr...

from artifact-cookbook.

jwalton avatar jwalton commented on July 24, 2024

By way of workaround, I commented out:

# symlinks ({
#     ".migrate-migrating" => "migrations/.migrate-migrating",
#     "local_config.coffee" => "configs/local_config.coffee"
# })

And added to the end of my before_symlink proc:

   script "do_symlink" do
       interpreter "bash"
       user "root"
       code <<-EOH
            ln -s "#{shared_dir}/.migrate-migrating" "#{release_path}/migrations/.migrate-migrating"
            ln -s "#{shared_dir}/local_config.coffee" "#{release_path}/configs/local_config.coffee"
        EOH
    end

Which, of course, fixes it.

from artifact-cookbook.

KAllan357 avatar KAllan357 commented on July 24, 2024

Hi, thanks for the report! I have a few random thoughts that I'll place here:

Just to make sure, do all of your link resources work in your before_symlink proc?

I noticed this line in your gist - https://gist.github.com/jwalton/da1634758061e190f049#file-partial-output-L39 - if your before_symlink is creating that file, there could be something bad happening when Chef attempts to make that directory.

Every time I come back to the symlinks code, I get slightly confused. I believe the intent is to symlink folders into the deploy directory and create them under shared.

Either way, the symlinks attribute is confusing and should be improved upon. Please let me know if any of my (somewhat random) thoughts help!

from artifact-cookbook.

jwalton avatar jwalton commented on July 24, 2024

I don't have any link resources in before_symlink, as I was relying on symlinks. :P

The readme says "symlinks - A hash that maps files in the shared directory to their paths in the current release", which makes it sound like it should work for plain files as well as for directories (and, like I said, it works on a vagrant VM for inexplicable reasons). I agree; the symlink code is a bit strange - I wonder if the intent is just to make sure that the file or directory being linked to is owned by the correct user with sane permissions, and create it if it doesn't exist? Perhaps some logic is required to check and see if the target is a file or a directory? I can try writing this up and seeing if it fixes the problem...

I still don't understand what any of this has to do with checksum, though. :(

from artifact-cookbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.