Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    David Ohayon
    @ohwutup
    nice. so that is exactly what i am trying to do, but it is a command line app that i am trying to bundle. and like i mentioned in that github issue it works when i call it from within the ruby_ship directory, but not from outside.
    im not so familiar about the ruby compilation process with all of the paths involved but i was wondering if you had ever tried to explore getting that to work?
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    yeah
    i commented on the github issue
    I don't know if you saw that
    the deal is that on osx the dylibs are dynamically linked based on the root folder, so you need to run those binaries from the context of the ruby_ship folder
    I am not entirely sure how this works on linux though because the same procedure isn't needed there, or is somehow handled without my influence
    David Ohayon
    @ohwutup
    ah, okay cool. yeah i am only working on OS X
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    From what language are you calling ruby_ship?
    David Ohayon
    @ohwutup
    just from the command line
    i have a command line gem that i want to use
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    ahh.. I see
    David Ohayon
    @ohwutup
    but it needs to be called from the working directory that it needs
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    what type of error are you getting?
    You can set the working directory if you get the ruby to run at all
    or you can wrap it in a thin bash-script which sets working directory
    David Ohayon
    @ohwutup
    /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle, 9): Library not loaded: bin/shipyard/darwin_ruby/dylibs/libssl.1.0.0.dylib (LoadError) Referenced from: /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle Reason: image not found - /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/openssl.rb:13:in `<top (required)>' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/gems/2.3.0/gems/excon-0.45.4/lib/excon.rb:6:in `<top (required)>' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/gems/2.3.0/gems/fastlane_core-0.37.0/lib/fastlane_core/update_checker/update_checker.rb:1:in `<top (required)>' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/gems/2.3.0/gems/fastlane_core-0.37.0/lib/fastlane_core.rb:6:in `<top (required)>' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/gems/2.3.0/gems/fastlane-1.66.0/lib/fastlane.rb:18:in `<top (required)>' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/lib/ruby/gems/2.3.0/gems/fastlane-1.66.0/bin/fastlane:6:in `<top (required)>' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/bin/fastlane:23:in `load' from /Users/dohayon/Twitter/git/ruby_ship/bin/shipyard/darwin_ruby/bin/fastlane:23:in `<main>'
    ah, that didn't work well, one sec
    Screen Shot 2016-03-23 at 9.45.52 AM.png
    yeah, i think you're right about the bash script
    so if i run the build script with other versions, is the darwin_ruby.sh shim always pointing to the most recent version?
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    Not sure I understand that last question.
    There is only one version of ruby "installed" at a time
    David Ohayon
    @ohwutup
    ah okay
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    and by the way, i just updated the osx ruby version to 2.3.0
    David Ohayon
    @ohwutup
    oh nice! thanks! we want to be able to reliably build new versions as they come out, i am going to give 2.4.0-dev a shot
    Stephan Nordnes Eriksen
    @stephan-nordnes-eriksen
    cool
    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