Skip to content

Instantly share code, notes, and snippets.

@nickcharlton
Created July 27, 2015 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcharlton/d6a05510acfefc86f74c to your computer and use it in GitHub Desktop.
Save nickcharlton/d6a05510acfefc86f74c to your computer and use it in GitHub Desktop.
$ bundle exec bin/run
dyld: lazy symbol binding failed: Symbol not found: _rb_str_new_static
Referenced from: /Users/nickcharlton/.gem/ruby/2.2.2/gems/json-1.8.3/lib/json/ext/parser.bundle
Expected in: flat namespace
dyld: Symbol not found: _rb_str_new_static
Referenced from: /Users/nickcharlton/.gem/ruby/2.2.2/gems/json-1.8.3/lib/json/ext/parser.bundle
Expected in: flat namespace
[1] 72256 trace trap bundle exec bin/run
@nickcharlton
Copy link
Author

In my case, this was caused by loading the wrong interpreter.

bin/run had #!/usr/bin/ruby at the top of it.

But, it should be #!/usr/bin/env ruby. This ensures that the environment is set before loading the interpreter, so if you're using something like chruby (for example), it'll set everything correctly first.

Now, it probably does work fine for a while (like it did for me), but eventually you'll end up in a position where it blows up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment