1

I know there are many similar questions but I couldn't find any suitable answer for mine from previous questions, please don't flag this questions as already existing. I would be very grateful if someone help me get going with my rails project on my laptop.

First of all I want to say few things which I have tried. I have been able to successfully install Rails on my personal pc using Rails installer and I have started and done few sample app/ projects.

BUT THE PROBLEM IS WHEN I AM TRYING TO INSTALL RAILS ON MY WORK(COMPANY) LAPTOP(Windows Vista) and start a new rails project I think the proxy is blocking gem install but I dont know how to overcome it.

I tried many ways

  1. Rails installer
  2. installing radrails and then installing rails on it
  3. installing ruby and then doing gems install rails

I have been unsuccessful all these ways, I have been trying for 2 days, so any help is greatly appreciated.

I am trying to install ruby 1.9.2, rails 3.1.0 when I do ruby -v & also rails -v I get the above results, but when I say

>rails new project

C:\Sites>rails new project

      create
      create  README
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/assets/images/rails.png
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  app/mailers/.gitkeep
      create  app/models/.gitkeep
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  lib/assets
      create  lib/assets/.gitkeep
      create  log
      create  log/.gitkeep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  script
      create  script/rails
      create  test/fixtures
      create  test/fixtures/.gitkeep
      create  test/functional
      create  test/functional/.gitkeep
      create  test/integration
      create  test/integration/.gitkeep
      create  test/unit
      create  test/unit/.gitkeep
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.gitkeep
      create  vendor/plugins
      create  vendor/plugins/.gitkeep
      **run  bundle install
Fetching source index for http://rubygems.org/
Could not reach rubygems repository http://rubygems.org/
Could not find gem 'turn (>= 0)' in any of the gem sources listed in your Gemfile.**

but the project is created , when I cd to the project

C:\Sites>cd project

C:\Sites\project>rails s

←[31mCould not find gem 'turn (>= 0)' in any of the gem sources listed in your G
emfile.←[0m
←[33mRun `bundle install` to install missing gems.←[0m

I didn't face any of these problems when i s=installed Ruby and Rails on my personal notebook.

3
  • As you mention, your computer from work seems to block your access to the online rep of rubygem. When you run bundle install, do you get any error message? Commented Sep 14, 2011 at 14:27
  • the error msg is C:\Sites\project>bundle install Fetching source index for rubygems.org Could not reach rubygems repository rubygems.org Could not find gem 'turn (>= 0)' in any of the gem sources listed in your Gemfile. Commented Sep 14, 2011 at 14:55
  • This is definitly a proxy setting issue. as mliebelt proposed, look into your winodws setting to see if any proxy is set. You can also check your browser setting to identify any Proxy used to communicate with the internet. Commented Sep 14, 2011 at 15:08

1 Answer 1

3

I have a similar setup for Rails (perviously Windows XP, now Windows 7, Rails 3.x, intranet of my company) and the following setup works for me:

  • Set the environment variable (Settings > System > Environment Variables or similar, I have a German Windows here) HTTP_PROXY to a working proxy (depending on your company) like http://proxy.my-company.com:80.
  • It has to include the protocol and the port.
  • Try then in a new opened shell echo %HTTP_PROXY%. You should see your definition.
  • Then e.g. gem list rails -r.

This should list all (remote) gems available. Bundles does use that as well.

Sign up to request clarification or add additional context in comments.

1 Comment

no freaking way i would have figured this out :)...worked like a charm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.