Ruby on Rails Wednesday, January 4, 2012

On Jan 4, 12:06 pm, Holm Dressler <li...@ruby-forum.com> wrote:
> Hi there,
>
>
> On my PC (which should be my local gem repository) - Linux system
>
> 1. mkdir /var/www/localhost/htdocs/gems
> 2. cp /usr/local/lib64/ruby/gems/1.9.1/cache/*.gem
> /var/www/localhost/htdocs/gems
> 3. gem generate_index -d /var/www/localhost/htdocs
>

If you use generate_index, you can serve the files directly with
Apache.

> 4. Starting the server with
>
>    gem server --dir /var/www/localhost/htdocs/
>
> This ends up with the following error message:
>
> ERROR:  While executing gem ... (ArgumentError)
> /var/www/localhost/htdocs does not appear to be a gem repository

`gem server` is expecting a folder structure like this:

ls -l /path

bin
cache
doc
gems
specification

>
> So the question is: how can I create a repository like under
> /usr/local/lib64/ruby/gems/1.9.1 . Is there a special command?
>

gem install foo -i /path

Then

gem server --dir /path

PS: If you want to host gems locally, please take a look to stickler
[1] or gemfury for hosted/remote one [2]

[1] https://github.com/copiousfreetime/stickler
[2] http://www.gemfury.com/
--
Luis Lavena

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment