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.
Installation
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.
1
| |
- 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.
1
| |
if that don’t work you need to export the path of the gems on your server should be like this:
1
| |
and then run bundle install.
- you need to restart the passenger in order for the settings to take place.
1
| |
will get the job done.
Usage
if you did other changes in the code you need to restart the passenger by doing
1
| |
in order to use this just add this to your Gemfile
1
| |
or if you setup the basic auth use this
1
| |
and you can access your private gems hosted on your own private gem server on Dreamhost.
Resources
- 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
Additionl Informaion
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.
Enjoy