How to Create Your Own Private Gem Server With Geminabox
Gem In A Box on Dreamhost
Check out the repo @ https://github.com/shukydvir/geminabox-dreamhost
How to run Gem In A Box on Dreamhost shared hosting.
Create a new domain/subdomain in Dreamhost control panel for the gem server make sure that you checked the Passenger (Ruby/Python apps only) option. You must also specify the location of the ‘public’ subdirectory of the Ruby on Rails (or other Rack-compliant) application at the same time which is just public.
SSH to your server and cd to the folder of the domain/subdomain.
Clone this repo locally or directly to your Dreamhost domain/subdomain you wish to have the gem server.
- Update the config.ru file with your username and password for the basic authentication or comment these lines if you don’t wise no authentication at all.
1 2 3 4
if you have cloned localy you need to upload the files to the server (choose which method you want rsync, scp, etc…)
run bundle install on the server.
if that don’t work you need to export the path of the gems on your server should be like this:
and then run bundle install.
- you need to restart the passenger in order for the settings to take place.
will get the job done.
if you did other changes in the code you need to restart the passenger by doing
in order to use this just add this to your Gemfile
or if you setup the basic auth use this
and you can access your private gems hosted on your own private gem server on Dreamhost.
- Dreamhost Passenger - http://wiki.dreamhost.com/Passenger
- Gem In A Box - https://github.com/cwninja/geminabox
- Gem In A Box - Http Basic Auth - https://github.com/cwninja/geminabox/wiki/Http-Basic-Auth
You can create a mirror of rubygems.org with this setup just point your data folder to your mirror folder.
you can user the rubygems-mirror gem to do this easily.
I’ll explain how I did that next post so stay tune…
Signup for Dreamhost account.
if you don’t have a Dreamhost shared hosting account you can create one using the Promo Code below:
- $30 discount if you pay for 1 year.
- $50 discount if you pay for 2 years.