{"id":16056535,"url":"https://github.com/markbates/gemtronics","last_synced_at":"2025-10-21T07:26:44.554Z","repository":{"id":635319,"uuid":"276460","full_name":"markbates/gemtronics","owner":"markbates","description":"A much better of managing your gem dependencies","archived":false,"fork":false,"pushed_at":"2009-10-07T18:09:30.000Z","size":106,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T21:35:53.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.metabates.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"go-martini/martini","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markbates.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-08-12T21:59:47.000Z","updated_at":"2017-06-11T17:47:39.000Z","dependencies_parsed_at":"2022-07-05T05:01:12.490Z","dependency_job_id":null,"html_url":"https://github.com/markbates/gemtronics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markbates/gemtronics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fgemtronics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fgemtronics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fgemtronics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fgemtronics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbates","download_url":"https://codeload.github.com/markbates/gemtronics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fgemtronics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280222707,"owners_count":26293412,"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-10-21T02:00:06.614Z","response_time":58,"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-09T03:00:22.031Z","updated_at":"2025-10-21T07:26:44.502Z","avatar_url":"https://github.com/markbates.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"=Gemtronics - Simple and Smart Gem Management\n\nGemtronics is designed to mitigate the pain of gem management for your Ruby applications. It can be used with standalone Ruby libraries or in Rails applications, it doesn't much matter to Gemtronics.\n\n===Installation\n\nGemtronics is, itself, a RubyGem. So yes, there is on dependency you have to have on your machine before you can use it to manage your other gems for your projects.\n\n  $ sudo gem install gemtronics\n\nOr, if you prefer to live on the edge:\n\n  $ sudo gem install markbates-gemtronics --source=http://gems.github.com\n\n==Usage\n\nGemtronics comes bundled with a binary that can help make life a little nicer. The binary has three different options, generate, convert, and install.\n\n===Generate\n\nGemtronics will generate a sample file for you by using the binary, like such:\n\n  $ gemtronics generate\n\nThat will output the following into a file called \u003ccode\u003econfig/gemtronics.rb\u003c/code\u003e:\n\n  group(:default) do |g|\n    # g.add('gem name here')\n    # g.add('gem name here', :version =\u003e '1.2.3')\n    # g.add('gem name here', :version =\u003e '1.2.3', :source =\u003e 'http://gems.example.com')\n    # g.add('gem name here', :version =\u003e '1.2.3', :source =\u003e 'http://gems.example.com', :require =\u003e ['file1', 'file2'])\n  end\n\n  group(:production, :dependencies =\u003e :default) do |g|\n  end\n\n  group(:development, :dependencies =\u003e :default) do |g|\n  end\n\n  group(:test, :dependencies =\u003e :development) do |g|\n  end\n\nIf you don't like that file path you can tell it where to generate the file for you:\n\n  $ gemtronics generate path/to/my/file.rb\n\nIt is encouraged that you use the default path for your file, as it will make it easier for Gemtronics to find it later.\n\n===Convert\n\nOn the off chance you are using the old Gemtools project for managing your gems, Gemtronics can easily convert that old school YAML file to the Gemtronics format:\n\n  $ gemtronics convert path/to/my/gems.yml\n\n===Install\n\nOnce you have setup your Gemtronics file, more on that in a minute, you can use it to easily install your gems from it:\n\n  $ gemtronics install\n\nGemtronics will read the \u003ccode\u003econfig/gemtronics.rb\u003c/code\u003e and install all the gems in the \u003ccode\u003e:default\u003c/code\u003e group. If you would like to specify a different group you can do that like so:\n\n  $ gemtronics install production\n\nIf you did not put your file in \u003ccode\u003econfig/gemtronics.rb\u003c/code\u003e you will need to specify the path:\n\n  $ gemtronics install default path/to/my/file.rb\n\nGemtronics will not install gems again if they already exist on your machine. This makes installation fast and easy!\n\n==Configuring Your Gems\n\nGemtronics has the concept that gems can be grouped. Why would you want to group your gems? Great question. Perhaps you have a default set of gems that you want to use with your application, you would put them in the \u003ccode\u003edefault\u003c/code\u003e group. In testing and development you might want to include other gems, such as \u003ccode\u003eruby-debug\u003c/code\u003e, that you wouldn't want running/installed on your production machines. In this case you would group them in another group that depends on the \u003ccode\u003edefault\u003c/code\u003e group.\n\nDefining a group is very easy:\n\n  group(:default) do |g|\n    g.add('gem1')\n  end\n\nWhen you add gems to a group you can set all the necessary gem options, or just inherit the default options. See the sample file below, or the rest of the RDOC for more information.\n\n===Rails\n\nRight about now you're saying to yourself, I use the Rails gem management system, why should I use this? Well, because the Rails gem management system is flawed at it's very core. You define your gems in the environment, which means the environment must be loaded to load/install your gems. However, this cause blow up if a gem is not installed when it loads the environment. Plus, why would you want to load the environment just to install gems?\n\nGemtronics also has the advantage of being an independent system to Rails, which means that you can use it to install Rails for you!\n\nTo use with Rails just create a file named \u003ccode\u003egemtronics.rb\u003c/code\u003e in your \u003ccode\u003econfig\u003c/code\u003e directory, and load it up with your favorite gems.\n\nOnce you've set up your gems just add the following inside the initializer block in \u003ccode\u003eenvironment.rb\u003c/code\u003e (where you would normally call \u003ccode\u003econfig.gem\u003c/code\u003e):\n\n  require 'gemtronics'\n  Gemtronics.for_rails(config)\n\nGemtronics will use the current \u003ccode\u003eRAILS_ENV\u003c/code\u003e to load the correct gem group. You can override this by passing in the \u003ccode\u003e:group\u003c/code\u003e option and specify which group you would like to use.\n\n==Sample:\n\n  group(:default) do |g|\n    g.add('gem1')\n    g.add('gem2', :version =\u003e '1.2.3')\n    g.add('gem3', :source =\u003e 'http://gems.github.com')\n    g.add('gem4', :require =\u003e 'gem-four')\n    g.add('gem5', :require =\u003e ['gem-five', 'gemfive'])\n    g.add('gem6', :load =\u003e false)\n  end\n\n  group(:production, :dependencies =\u003e :default) do |g|\n    g.add('gem3', :load =\u003e false)\n    g.remove('gem1')\n    g.add('gem4', :source =\u003e 'http://gems.example.org')\n  end\n\n  group(:development, :dependencies =\u003e :default) do |g|\n    g.add('gem7', :version =\u003e '\u003e=1.2.3.4', :load =\u003e false, :require =\u003e 'gemseven')\n  end\n\n  group(:test, :dependencies =\u003e :development, :source =\u003e 'http://gems.example.com') do |g|\n    g.add('gem8')\n  end\n\n  group(:staging) do |g|\n    g.add('gem2', :version =\u003e '3.2.1')\n    g.dependency(:development)\n    g.add('gem7', :load =\u003e true)\n  end\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbates%2Fgemtronics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbates%2Fgemtronics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbates%2Fgemtronics/lists"}