i''m trying to tell rails to use a proxy, but i''m getting an error at the command line, does anybody know what this means? C:\InstantRails>gem install rails --include-dependencies --http-proxy int ernet.mywebsite.net:80 ERROR: While executing gem ... (NoMethodError) undefined method `[]='' for #<Gem::ConfigFile:0x27e758c> -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Lawson wrote:> i''m trying to tell rails to use a proxy, but i''m getting an error at the > command line, does anybody know what this means? > > C:\InstantRails>gem install rails --include-dependencies --http-proxy > int > ernet.mywebsite.net:80 > ERROR: While executing gem ... (NoMethodError) > undefined method `[]='' for #<Gem::ConfigFile:0x27e758c> > >While this is not an answer to your question, but it would appear (unless it''s a huge coincidence) that you''re using InstantRails. If that''s the case, rails is already installed. Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mohit Sindhwani wrote:> Matt Lawson wrote: >> i''m trying to tell rails to use a proxy, but i''m getting an error at the >> command line, does anybody know what this means? >> >> C:\InstantRails>gem install rails --include-dependencies --http-proxy >> int >> ernet.mywebsite.net:80 >> ERROR: While executing gem ... (NoMethodError) >> undefined method `[]='' for #<Gem::ConfigFile:0x27e758c> >> >> > While this is not an answer to your question, but it would appear > (unless it''s a huge coincidence) that you''re using InstantRails. If > that''s the case, rails is already installed. > > Cheers > Mohit.yes rails is installed, i am needing to know how to use rails with a proxy server -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Lawson wrote:> Mohit Sindhwani wrote: > >> Matt Lawson wrote: >> >>> i''m trying to tell rails to use a proxy, but i''m getting an error at the >>> command line, does anybody know what this means? >>> >>> C:\InstantRails>gem install rails --include-dependencies --http-proxy >>> int >>> ernet.mywebsite.net:80 >>> ERROR: While executing gem ... (NoMethodError) >>> undefined method `[]='' for #<Gem::ConfigFile:0x27e758c> >>> >>> >>> >> While this is not an answer to your question, but it would appear >> (unless it''s a huge coincidence) that you''re using InstantRails. If >> that''s the case, rails is already installed. >> >> Cheers >> Mohit. >> > > yes rails is installed, i am needing to know how to use rails with a > proxy server > >Hi Matt, The command that you are trying to use will install rails on your PC when the PC is behind a proxy. I''m not sure what you mean by "use rails with a prxoy server" - do you want a client behind a proxy server to access your web content, or do you want your web application to be served from a server behind a proxy. In both cases, the approach that you''re taking will only install rails - it won''t do either of the 2 options I mentioned above. Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mohit Sindhwani wrote:> Matt Lawson wrote: >>>> ERROR: While executing gem ... (NoMethodError) >>> >> >> yes rails is installed, i am needing to know how to use rails with a >> proxy server >> >> > Hi Matt, > > The command that you are trying to use will install rails on your PC > when the PC is behind a proxy. I''m not sure what you mean by "use rails > with a prxoy server" - do you want a client behind a proxy server to > access your web content, or do you want your web application to be > served from a server behind a proxy. In both cases, the approach that > you''re taking will only install rails - it won''t do either of the 2 > options I mentioned above. > > Cheers > Mohit.I guess i need to clarify a little... I have a rails application that uses http/https to read/write to a database through an API, and it works fine when i''m at home, but not when i''m at work (behind corporate firewall). i''m needing to know how to get this application to work behind the firewall... -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Lawson wrote:> > I guess i need to clarify a little... > > I have a rails application that uses http/https to read/write to a > database through an API, and it works fine when i''m at home, but not > when i''m at work (behind corporate firewall). > > i''m needing to know how to get this application to work behind the > firewall...Any suggestions Mohit? -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Lawson wrote:> Matt Lawson wrote: > > >> I guess i need to clarify a little... >> >> I have a rails application that uses http/https to read/write to a >> database through an API, and it works fine when i''m at home, but not >> when i''m at work (behind corporate firewall). >> >> i''m needing to know how to get this application to work behind the >> firewall... >> > > Any suggestions Mohit? >(resend - I recd an error when I sent the mail the first time. Sorry if you receive multiple copies) Morning, Matt! Where is the database that you''re trying to reach? It appears to me that your database is not running on the same PC as InstantRails. So what seems to be happening is that your corporate firewall is blocking Rails from accessing the database server. For example, for MySQL, Ruby (Rails) typically needs to access port 3306. It seems that your corporate firewall is blocking that. If that''s the case, you probably need your IT guys to allow Ruby to access the remote database server using the port. Perhaps someone else can be of help? Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mohit Sindhwani wrote:> Matt Lawson wrote: >>> firewall... >>> >> >> Any suggestions Mohit? >> > > (resend - I recd an error when I sent the mail the first time. Sorry if > you receive multiple copies) > > Morning, Matt! Where is the database that you''re trying to reach? It > appears to me that your database is not running on the same PC as > InstantRails. So what seems to be happening is that your corporate > firewall is blocking Rails from accessing the database server. For > example, for MySQL, Ruby (Rails) typically needs to access port 3306. > It seems that your corporate firewall is blocking that. If that''s the > case, you probably need your IT guys to allow Ruby to access the remote > database server using the port. > > Perhaps someone else can be of help? > > Cheers > Mohit.Yes I am accessing a remote database through an API (basecamp actually). When i try to run the application, i see the following ports being blocked: Proto Local Address Foreign Address State TCP 127.0.0.1:1416 127.0.0.1:3000 TIME_WAIT TCP 127.0.0.1:3000 127.0.0.1:1415 TIME_WAIT TCP 127.0.0.1:3000 127.0.0.1:1417 TIME_WAIT TCP 127.0.0.1:3000 127.0.0.1:1418 TIME_WAIT TCP 127.0.0.1:3000 127.0.0.1:1419 TIME_WAIT -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Lawson wrote:> Mohit Sindhwani wrote: >> Matt Lawson wrote: >>>> firewall...figured it out, thought i''d post the soluction for anyone else who might read this thread. To access documents via HTTP when a proxy server is required, use the Net::HTTP::Proxy class. example: require ''net/http'' proxy_addr = ''your.proxy.host'' proxy_port = 8080 : Net::HTTP::Proxy(proxy_addr, proxy_port).start(''example.com'') {|http| # always connect to your.proxy.addr:8080 : } further reading: ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Lawson wrote:> Matt Lawson wrote: > >> Mohit Sindhwani wrote: >> >>> Matt Lawson wrote: >>> >>>>> firewall... >>>>> > > > figured it out, thought i''d post the soluction for anyone else who might > read this thread. > > To access documents via HTTP when a proxy server is required, use the > Net::HTTP::Proxy class. > > example: > > require ''net/http'' > > proxy_addr = ''your.proxy.host'' > proxy_port = 8080 > : > Net::HTTP::Proxy(proxy_addr, proxy_port).start(''example.com'') > {|http| > # always connect to your.proxy.addr:8080 > : > } > > further reading: > ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html > >Good to know, Matt. Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---