{"id":16946097,"url":"https://github.com/lsegal/gem-sane-binary","last_synced_at":"2025-07-28T15:06:49.650Z","repository":{"id":592517,"uuid":"227134","full_name":"lsegal/gem-sane-binary","owner":"lsegal","description":"RubyGems plugin to allow gem install to generate executables that work for both Ruby 1.8 and 1.9","archived":false,"fork":false,"pushed_at":"2009-08-07T17:57:19.000Z","size":76,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T19:53:16.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gnuu.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"adjust/redismq","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsegal.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-06-14T21:51:16.000Z","updated_at":"2017-05-22T01:47:22.000Z","dependencies_parsed_at":"2022-07-05T02:02:05.569Z","dependency_job_id":null,"html_url":"https://github.com/lsegal/gem-sane-binary","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lsegal/gem-sane-binary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fgem-sane-binary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fgem-sane-binary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fgem-sane-binary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fgem-sane-binary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsegal","download_url":"https://codeload.github.com/lsegal/gem-sane-binary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fgem-sane-binary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267534874,"owners_count":24103189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:24:57.687Z","updated_at":"2025-07-28T15:06:49.543Z","avatar_url":"https://github.com/lsegal.png","language":"Ruby","readme":"gem-sane-binary\n===============\n\nMIT License \u0026copy; 2009 by Loren Segal\n\nSYNOPSIS\n--------\n\nRight now RubyGems rewrites the shebang for the binaries (executables) it \ngenerates in a gem using the current Ruby executable name, which inadvertently \ncauses the binary to be tied to the specific Ruby version. This means you need \nto reinstall a gem everytime you switch Ruby interpreters to regenerate the \nbinaries.\n\nThis gem adds a RubyGems plugin to change the shebang behaviour to use a `ruby` \nsymlink if one is available in the same directory as the Ruby interpreter being \nused. This allows you to symlink `ruby` to whichever current Ruby interpreter \nis being used, making it easier for 1.8/1.9 to co-exist on a system.\n\nINSTALL\n-------\n\n    $ gem install gem-sane-binary\n   \nUSING\n-----\n\nTo use the gem, you just need to have a `ruby` symlink pointing to your correct\nRuby interpreter in the same directory as the interpreter that gem uses when\ninstalling your gems.\n\nSETTING UP RUBY 1.8 AND RUBY 1.9\n--------------------------------\n\nIf you don't already have two Ruby installs, you should probably read bellow\nto get setup, otherwise this gem won't be very helpful to you.\n\nThis gem works best for Ruby 1.8/1.9 compatibility. If you want to install Ruby\n1.8 and Ruby 1.9 side by side, recompile Ruby 1.9 with:\n  \n    ruby-1.9.1...$ ./configure --program-suffix=19\n    \nYou'll then want to rename any ruby 1.8 binaries to use their suffix names as\nwell (I'm assuming you already have 1.8 installed. If not, install 1.8 with\na suffix as well and skip this step):\n\n    $ sudo mv /usr/local/bin/ruby /usr/local/bin/ruby18\n    $ sudo mv /usr/local/bin/irb /usr/local/bin/irb18\n    $ sudo mv /usr/local/bin/gem /usr/local/bin/gem18\n    \nThen create your ruby/irb/gem symlinks to point to whichever Ruby install you're\nusing:\n\n    $ ln -fs /usr/local/bin/ruby19 /usr/local/bin/ruby\n    $ ...\n    \nI use the following aliases in my `~/.profile` to switch between Ruby installs:\n\n    alias ruby-switch-18='sudo ln -fs /usr/local/bin/ruby18 /usr/local/bin/ruby \u0026\u0026\n      sudo ln -fs /usr/local/bin/irb18 /usr/local/bin/irb \u0026\u0026\n      sudo ln -fs /usr/local/bin/gem18 /usr/local/bin/gem'\n    alias ruby-switch-19='sudo ln -fs /usr/local/bin/ruby19 /usr/local/bin/ruby \u0026\u0026\n      sudo ln -fs /usr/local/bin/irb19 /usr/local/bin/irb \u0026\u0026\n      sudo ln -fs /usr/local/bin/gem19 /usr/local/bin/gem'\n\nThen I get:\n\n      ~$ ruby-switch-18 \u0026\u0026 ruby --version \n      ruby 1.8.7 (2009-01-28 patchlevel 99) [i686-darwin9.6.0]\n      ~$ ruby-switch-19 \u0026\u0026 ruby --version\n      ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsegal%2Fgem-sane-binary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsegal%2Fgem-sane-binary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsegal%2Fgem-sane-binary/lists"}