Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    I found that i needed to do a brew install libffi and then 2.3.0 build successfully
    However, i believe you will have a hard time "reliably building new versions" as the dev dependencies might change from version to version
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    The error you are getting is related to linking problems. You need to run the auto_relink_dylibs.rb
    David Ohayon
    @ohwutup
    nah, calling it from outside the directory it always fails after doing that
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    I suspect it crashed for some reason. It is supposed to run automatically when you build a new version
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    What command are you running that is causing this?
    David Ohayon
    @ohwutup
    path/to/ruby_ship/bin/shipyard/darwin_ruby/darwin_<myscript>.sh <arguments>
    where darwin_<myscript>.sh is a shim to my script based of your shims with other things like darwin_gem.sh
    but i get the sam error if i do path/to/ruby_ship/bin/shipyard/darwin_ruby/darwin_ruby/bin/<my_script> <arguments>
    if i do either of those from outside the root ruby_ship directory i get the error
    when I'm inside the ruby_ship directory i get that ssl crash
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    Yeah. I am getting the same thing. Trying to see if I can manipulate workingdirectory
    David Ohayon
    @ohwutup
    oh that would be amazing
    I'm curious to know how you would do that too
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    I see that I have tried to add this already
    if you have a look at the line in ruby_ship.sh: DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    That should in theory change working directory, but apparently it does not do that correctly
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    Ok, I think I have something here
    It is a bit quirky though, but try to swap out your ruby_ship.sh with this:
    OS="unknown"
    if [[ "$OSTYPE" == "linux"* ]]; then
        OS="linux"
    elif [[ "$OSTYPE" == "darwin"* ]]; then
        OS="darwin"
    elif [[ "$OSTYPE" == "cygwin" ]]; then
        OS="win"
    elif [[ "$OSTYPE" == "win32" ]]; then
        OS="win"
    elif [[ "$OSTYPE" == "freebsd"* ]]; then
        OS="freebsd"
    else
        echo "OS not compatible"
        exit 1
    fi
    
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    cd "$( dirname "${BASH_SOURCE[0]}" )/../"
    SSL_CERT_FILE="${DIR}/shipyard/cacerts.pem" "${DIR}/shipyard/${OS}_ruby.sh" "$@"
    Quirk;
    Your parameters will needs to be absolute paths or relative to the ruby_ship folder
    eg: This will not work: my_folder/path/to/ruby_ship/bin/ruby_ship.sh ./my_script_in_my_folder.rb
    David Ohayon
    @ohwutup
    right, but i am doing my_folder/path/to/ruby_ship/bin/shipyard/my_wrapper.sh arguments
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    So you essentially have your own ruby_ship.sh file?
    or are you using the ruby_ship.sh file within your wrapper?
    David Ohayon
    @ohwutup
    yeah, i copied the ruby_ship_gem.sh and modified it to call my script
    my executable*
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    Ok
    I believe a better approuch could be to wrap the provided wrappers in stead
    David Ohayon
    @ohwutup
    how can i call a ruby gem's command line executable using those wrappers though
    thats what I'm a bit confused about
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    The wrappers work exactly like the normal commands
    so ruby_ship_gem.sh works exactly the same as gem
    so you can do: ruby_ship_gem.sh install whatever
    the only reason why those wrappers exist is that there is some hustling around with environment variables that forces stuff to work portably
    and it also routes to the right os-variation of this
    David Ohayon
    @ohwutup
    right, so then how would you call one of those gems from outside the directory?
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    Yeah.. Now I see where you are going
    Have a look at for instance darwin_bundler.sh
    and ruby_ship_bundler.sh
    David Ohayon
    @ohwutup
    yup
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    This is essentially what you want to emulate
    David Ohayon
    @ohwutup
    right. yeah, so maybe i am doing something wrong there, but i tried to follow that same pattern
    ill give it another shot though and let you know!
    thank you so much for your help
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    And you need to do the same thing as I did in the ruby_ship.sh above, namely setting the correct working directory: cd "$( dirname "${BASH_SOURCE[0]}" )/../"
    But you will get the same quirk. If the arguments are relative paths, then stuff won't work right
    David Ohayon
    @ohwutup
    thats cool, the arguments are normally just commands to be executed, but we can expand relative paths in the script right to get their absolutes
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    I am trying to find a reliable way to expand relative paths, but can't find a good *nix solution