Gem Server is not serving gems
hi Guys,
I am trying to make a new acceptance agent for teamcity...I followed this article http://docs.rubygems.org/read/chapter/18...
I created a website in IIS called gemserver and having a port 910. it has gems folder which has ancient gems like activerecord-sqlserver-adapter-1.0.0.9250...
I dont know the mime-type for .gem extension so I just put application/x-ruby-gem. Although manually when i put http://machinename:910/gems/ i am able to dowload it.
but when i use bundle install it gives below error
Fetching source index for http://gems.github.com/
Fetching source index for http://WGB01AP1128:910/
Could not reach rubygems repository http://gems.github.com/, http://WGB01AP1128:
910/, http://rubygems.org/
Fetching source index for http://rubygems.org/
Could not find gem 'activerecord-sqlserver-adapter (= 1.0.0.9250,
runtime)' in a
ny of the gem sources listed in your Gemfile.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by kamran.pervaiz on 16 Nov, 2012 11:22 AM
seocondly when i use generate_index it does not generate yaml and yaml.Z but it is already there because i just copied it from other server. Other acceptance agents are working fine but this one is giving errors unfortunately :(
2 Posted by kamran.pervaiz on 23 Nov, 2012 10:39 AM
anyone want to reply please?
Support Staff 3 Posted by Eric Hodel on 23 Nov, 2012 08:20 PM
yaml and yaml.Z are no longer necessary.
Please show the output of
gem generate_index -V
andgem install -V gem_on_your_server
4 Posted by kamran.pervaiz on 26 Nov, 2012 10:01 AM
Sorry for late reply please find attached the output. The thing is I have ruby installed on my local computer but it is not installed on the Gem server because it is not needed I guess. I do "gem generate_index" on my localhost and copy the folder to that system.
Could you please tell me how to setup in IIS? I use "application/x-ruby-gem" Mime type but gem install -V gem_server is giving could not find a valid gem?
Support Staff 5 Posted by Eric Hodel on 26 Nov, 2012 07:22 PM
I'm confused about your expectations.
You haven't added any gems to the gem server:
Without adding gems to the server it's useless.
Additionally you haven't tried to install gems from this server.
http://WGB01AP1128:910/
is not a gem name. You need to set it as a source (--source
) instead. Since you haven't added any gems to the server no gem can be installed, though.6 Posted by kamran.pervaiz on 27 Nov, 2012 10:11 AM
I just followed the below article.
http://docs.rubygems.org/read/chapter/18
Could you please let me know the steps how to add gems, yaml and yaml.z. Please find attached the list of files in the gem server.
when you say you have not added gems what do you mean? Above article says that all you need is to add a folder called gems and paste all the gems in it.
Is it possible to have a steps or article to follow?
7 Posted by kamran.pervaiz on 27 Nov, 2012 03:12 PM
One more thing when i do generate_index it does not create yaml and yaml.z files. I am not sure why?
8 Posted by kamran.pervaiz on 27 Nov, 2012 03:25 PM
find below the attache file when i did
gem install -v gem_name --source mygemserver
9 Posted by kamran.pervaiz on 27 Nov, 2012 03:47 PM
I have run the command gem generate_index -d path on the server after installing ruby and here is the log file for that but when i run the gem install -v....it gives same error 504 blah blah...
Support Staff 10 Posted by Eric Hodel on 27 Nov, 2012 06:37 PM
Unless you need to support RubyGems before version 1.2 yaml.Z is not needed. The documentation may be outdated.
Since you are getting 5XX errors, it seems that the problem lies with your web server. Your output from
gem generate_index
indicates the correct files were created. Please check your server settings. Unfortunately, I can't help you with that.11 Posted by kamran.pervaiz on 28 Nov, 2012 10:08 AM
Eric, when I type file in browser I can download the file but only in command prompt it is saying that 504 bad response...Any Idea?
12 Posted by kamran.pervaiz on 29 Nov, 2012 05:30 PM
is this a valid command at all because fiddler is not showing anything...
gem install -V activerecord-sqlserver-adapter-1.0.0.9250 --source http://WGB01AP1128:910/
Support Staff 13 Posted by Eric Hodel on 29 Nov, 2012 06:32 PM
run
gem install …
with-V
then cut and paste the URL that gave 504 or 503 into your browser. Does it succeed?What is fiddler?
Note that activerecord-sqlserver-adapter-1.0.0.9250 is not a valid gem name.
I think you want
gem install -V activerecord-sqlserver-adapter -v 1.0.0.9250 --source http://WGB01AP1128:910/
14 Posted by kamran.pervaiz on 30 Nov, 2012 12:47 PM
fiddler shows http traffic from the box it is installed...
I tried your command and it is still giving same error. when I cut and paste http://WGB01AP1128:910/latest_specs.4.8.gz in the browser it does download the file...I am not sure what is going on...
Support Staff 15 Posted by Eric Hodel on 30 Nov, 2012 10:00 PM
Does your web browser use a proxy server to connect? If so, you need to configure RubyGems to use it.
I'm not sure what to do if not. This apparently is a bug of your web server, so you will have to contact someone else for help.
16 Posted by kamran.pervaiz on 06 Dec, 2012 09:43 AM
I have finally managed to solve it.
Use the IP address of the computer rather than computer name e.g. http://10.16.7.35:910/
.gz and .rz Mime types were missing from the IIS i.e.
.gem (application/x-ruby-gem) .rz (application/x-rzip)
delete Gemfile.lock and try bundle install.
Hope this helps.
Nick Quaranto closed this discussion on 19 Dec, 2012 01:36 AM.