Trying to install Rails and create new project, but not possible
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
- Rails installer
- installing radrails and then installing rails on it
- 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 ra开发者_如何转开发ils -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.
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) likehttp://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.
精彩评论