gem install rails

maybe this question was ment to be in a ruby specific group but…

I am not getting to specify a version for my gems…

C:\Windows\System32>gem install rails --version=1.1.6 Updating metadata for 241 gems from http://gems.rubyforge.org/ complete Bulk updating Gem source index for: http://gems.rubyonrails.org/ ERROR: could not find rails locally or in a repository

without version it goes ok…

my environment:

C:\Windows\System32>gem environment RubyGems Environment:

  • RUBYGEMS VERSION: 1.1.0 (1.1.0)
  • RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
  • INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: c:/ruby/bin/ruby.exe
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mswin32-60
  • GEM PATHS:
    • c:/ruby/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

In linux it runs into the very same problem…

thanks

gem sources -r gems.rubyonrails.org

Should fix your problem.

Jason

Try:

gem install -v=1.1.6 rails--include-dependencies

That seems bass ackards to me but thats what is says here:

Thank you, but didn’t work:

C:\Windows\System32>gem sources -r gems.rubyonrails.org source gems.rubyonrails.org not present in cache

C:\Windows\System32>gem instal rails --version=1.1.6 Updating metadata for 8 gems from http://gems.rubyforge.org/ … complete Bulk updating Gem source index for: http://gems.rubyonrails.org/ ERROR: could not find rails locally or in a repository

's

It should work. It worked for me.

also I only used one hyphen gem install rails -v=1.1.6 instead of gem install rails --v=1.1.6

What version of ruby, gems, rails and rake do you have? here is what I have.

C:\ruby\lib\ruby>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\ruby\lib\ruby>gem -v 0.9.4

C:\ruby\lib\ruby>rails -v Rails 2.0.2

C:\ruby\lib\ruby>rake --version rake, version 0.8.1

here is what I typed and the result. At the bottom of that mess are instructions to re-install Gems 1.0.1. You might play with that and google a bit on unstable gem versions like 0.95. I am thinking that I once had gems 1.01 and downgrade to 0.9.4 but I can't remember

C:\ruby\lib\ruby>gem install rails -v=1.1.6 Bulk updating Gem source index for: http://gems.rubyforge.org Install required dependency activesupport? [Yn] y Install required dependency activerecord? [Yn] y Install required dependency actionpack? [Yn] y Install required dependency actionmailer? [Yn] y Install required dependency actionwebservice? [Yn] y Successfully installed rails-1.1.6 Successfully installed activesupport-1.3.1 Successfully installed activerecord-1.14.4 Successfully installed actionpack-1.12.5 Successfully installed actionmailer-1.2.5 Successfully installed actionwebservice-1.1.6 Installing ri documentation for activesupport-1.3.1... While generating documentation for activesupport-1.3.1 ... MESSAGE: Unhandled special: Special: type=17, text="<!-- HI -->" ... RDOC args: --ri --op c:/ruby/lib/ruby/gems/1.8/doc/ activesupport-1.3.1/ri -- quiet lib (continuing with the rest of the installation) Installing ri documentation for activerecord-1.14.4... Installing ri documentation for actionpack-1.12.5... While generating documentation for actionpack-1.12.5 ... MESSAGE: Unhandled special: Special: type=17, text="<!-- The header part o f this layout -->" ... RDOC args: --ri --op c:/ruby/lib/ruby/gems/1.8/doc/ actionpack-1.12.5/ri --qu iet lib (continuing with the rest of the installation) Installing ri documentation for actionmailer-1.2.5... Installing ri documentation for actionwebservice-1.1.6... Installing RDoc documentation for activesupport-1.3.1... Installing RDoc documentation for activerecord-1.14.4... Installing RDoc documentation for actionpack-1.12.5... Installing RDoc documentation for actionmailer-1.2.5... Installing RDoc documentation for actionwebservice-1.1.6...

C:\ruby\lib\ruby>

instructions for reinstalling gems 1.01 1.Uninstall the current rails - gem uninstall rails 2. Uninstall the current rake - gem uninstall rake (with out this rails installation was throwing error) 3.clean up - gem clean 4.Down load the gems 1.0.1, unzip it 5.cd to the gems unziped folder 6.install new gem - ruby setup.rb 7. verify - gem -v , should report 1.0.1 8.clean up again - gem clean 9.Install rake - gem install rake , this will install rake 0.8.1 10.install rails - gem install rails thats it...it took some combos for me to figure this out

Are you using a localized version of windows?

matt@blacksmith:~$ sudo gem install rails -v=1.2.6 Bulk updating Gem source index for: http://gems.rubyonrails.org/ ERROR: could not find rails locally or in a repository

matt@blacksmith:~$ ruby -v ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] matt@blacksmith:~$ rails -v Rails 2.0.2 matt@blacksmith:~$ gem -v 1.1.0 matt@blacksmith:~$ rake -version /usr/bin/rake: invalid option -- e matt@blacksmith:~$ rake --version rake, version 0.8.1

I suggest that the reason it works for you is that you have the gem in your local cache. The 1.x Rails family seem to have left the rubyonrails.org Repository. However, specifying the rubyforge repo seems to get the job done:

matt@blacksmith:~$ sudo gem install rails -v=1.2.6 --source=http:// gems.rubyforge.org/ Bulk updating Gem source index for: http://gems.rubyforge.org/ Successfully installed activesupport-1.4.4 Successfully installed activerecord-1.15.6 ... etc.

Gem seems a bit inconsistent when it looks at repositories; sometimes it just checks rubyonrails.org, but other times it looks at ror + rubyforge remote repositories. Shrug.

Thank you very much… Another solution was to remove the sources manualy… gem sources -r didn’t work, but gem sources -l and then removing each one by gem sources -r http://… worked just fine…

thanks

Hi everybody, i tried to follow all of your tips to install rails but i always can go done with that.

I installed : 1) ruby186-27_rc2.exe 2) gem install rails -v=2.1.2 --source=http://gems.rubyforge.org/ (its because i need that version)

and i got that error : ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: could not find gem rails locally or in a repository

I tried to remove rake, the source "RubyGems.org | your community gem host; and reinstall but i've the same error.

My environment is :

RubyGems Environment:   - RUBYGEMS VERSION: 1.3.3   - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]   - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8   - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe   - EXECUTABLE DIRECTORY: C:/Ruby/bin   - RUBYGEMS PLATFORMS:     - ruby     - x86-mswin32-60   - GEM PATHS:      - C:/Ruby/lib/ruby/gems/1.8      - C:/Documents and Settings/Administrator/.gem/ruby/1.8   - GEM CONFIGURATION:      - :update_sources => true      - :verbose => true      - :benchmark => false      - :backtrace => false      - :bulk_threshold => 1000      - :sources => ["RubyGems.org | your community gem host]   - REMOTE SOURCES:      - http://gems.rubyforge.org/

Please help me because i spend a lot of time (one week) on the Internet and i don't have the solution about my problem.

Thanks for your help.

Ricardo Acras wrote: